sloth's People
sloth's Issues
wp-rest is broken
/wp-json/wp/v2/posts shows this error:
{
code: "rest_post_invalid_page_number",
message: "Die angeforderte Seitennummer ist größer als die Anzahl der verfügbaren Seiten.",
data: {
status: 400
}
}
@maxleistner ;-)
Image: Trying to get property of non-object
2× | PHP Notice: Trying to get property of non-object in /var/www/vendor/sixmonkey/sloth/src/Field/Image.php:64 |
---|---|
1× | PHP Notice: Trying to get property of non-object in /var/www/vendor/sixmonkey/sloth/src/Field/Image.php:265 |
View [pagination.default] not found.
If the method links() is called ($posts->links();
) to generate the navigation bar for more pages in the blog, the following error occurs in Illuminate\Pagination\LengthAwarePaginator->links()
:
View [pagination.default] not found.
Call stack:
/html/vendor/illuminate/view/FileViewFinder.php:79 source Illuminate\View\FileViewFinder->findInPaths(arguments)
/html/vendor/illuminate/view/Factory.php:128 source Illuminate\View\FileViewFinder->find(arguments)
.../illuminate/pagination/LengthAwarePaginator.php:92 source Illuminate\View\Factory->make(arguments)
.../illuminate/pagination/LengthAwarePaginator.php:78 source Illuminate\Pagination\LengthAwarePaginator->render(arguments)
The same happens if the method is called directly in twig with
{{ posts.links }}
worked before - does not any more (since commit f911f06)
Pagination error
Pagination does not work within admin area or REST Api requests. Sloth overrides the pagination settings with a hacky solution which does lead to infinite per page results (-1).
Template für Custom-Post-Type definieren
Es sollte eine Möglichkeit geben einem Model ein bestimmtes Twig-Layout zuzuweisen.
Object of class WP_Term could not be converted to string
ACF field synchronization bug
ACF fields are not synchronized correctly. Changes to an acf field are not getting synchronized via sloth and are missing within the admin view. The acf json file gets replaced by the edited file, but i guess the database has still the old values. Maybe it is a problem with the trigger who pushes the changes from the file to the database?
make possible to configure src directory
Currently when using the scaffolder like php sloth.php create-module
it assumes a fix folder on projects root to be the target for autogenerated sass-files. that should be configurable, as the structure of a project might be different.
Warning: Class Configure can't be declared
The following warning appears after every reload of a page in the /log/error.log
PHP Warning: Cannot declare class Configure, because the name is already in use in /var/www/html/vendor/sixmonkey/sloth/src/Core/Sloth.php:110
Custom image sizes not working
Settings within the theme:
Configure::write(
'theme.image-sizes',
[
'rel_teaser_box' => [
'width' => 600,
'height' => 500,
'crop' => true,
'upscale' => true,
],
'product_image_thumbs' => [
'width' => 400,
'height' => 400,
'crop' => true,
'upscale' => true,
],
]
);
Call within twig template:
{{ slide.product_productImages_image.sizes.product_image_thumbs | print_r }}
or
{{ slide.product_productImages_image.getThemeSized('product_image_thumbs') | print_r }}
returns:
"http://localhost:4000/uploads/2020/04/Biryani-Rezepet-Huhn-Indien-1920x1080-1-mobile-crop-400x400.jpg" (100)
in .../sloth/src/View/Extensions/SlothTwigExtension.php:99
Calling the image itself return the following error:
Class 'League\Glide\ServerFactory' not found
Class 'Illuminate\Translation\ArrayLoader' not found
The following errors appear if a post is saved or an admin Ajax function is called.
Something within the Validation Class can't be called. May be a dependency problem.
exception.log
Error: Class 'Illuminate\Translation\ArrayLoader' not found in /var/www/html/vendor/sixmonkey/sloth/src/Validation/ValidationServiceProvider.php:15
error.log
PHP Warning: Cannot declare class Configure, because the name is already in use in /var/www/html/vendor/sixmonkey/sloth/src/Core/Sloth.php:110
Class MENU does not work with multi-levels Menus
If a Menu is called all menu items are delivered on the same level, even if in the WordPress Admin the Menu is sorted like this f.e.:
- Menu Item 1
-- Menu Item 1.1
-- Menu Item 1.2 - Menu Item 2
- Menut Item 3
A debug delivers any array with all items on the same level. Only the parent_item id is saved within the object.
It would be perfect if the Class Menu would deliver the submenu items as sub-items like it is done in the normal WordPress logic or Timber-Logic.
There might be a hint how this can be done here: https://github.com/corcel/corcel#multi-levels-menus
Author dropdown is missing by default
If there is no model for a post-type and/or you do not explicitly support the author within a model, the dropdown is missing from the wordpress admin single post-view.
After adding
'supports' => ['author']
to the Model options the dropdown appears again.
Therefore the default should be fixed if there is no model.
spatie/image requires spatie/temporay-directory --> leads to php version error
composer install on a php7.4 machine leads to the following error:
Installing dependencies (including require-dev) from lock file
output Your requirements could not be resolved to an installable set of packages.
output Problem 1
output - spatie/temporary-directory 2.0.0 requires php ^8.0 -> your PHP version (7.4.20) overridden by "config.platform.php" version (7.4.14) does not satisfy that requirement.
output - spatie/temporary-directory 2.0.0 requires php ^8.0 -> your PHP version (7.4.20) overridden by "config.platform.php" version (7.4.14) does not satisfy that requirement.
output - Installation request for spatie/temporary-directory 2.0.0 -> satisfiable by spatie/temporary-directory[2.0.0].
sloth asks for spatie/image version ^1.5 - should be a fixed version i guess?
images are missing their sizes array
BadMethodCallException Error (Illuminate)
Since an update of Illuminate the following error appears:
BadMethodCallException: Method Illuminate\Database\Query\Builder::getTaxonomy does not exist. in /var/www/vendor/illuminate/database/Query/Builder.php:2816
Stack trace:
#0 /var/www/vendor/illuminate/database/Eloquent/Builder.php(1286): Illuminate\Database\Query\Builder->__call()
#1 /var/www/vendor/illuminate/database/Eloquent/Model.php(1570): Illuminate\Database\Eloquent\Builder->__call()
#2 /var/www/vendor/sixmonkey/sloth/src/Plugin/Plugin.php(138): Illuminate\Database\Eloquent\Model->__call()
#3 /var/www/public/cms/wp-includes/class-wp-hook.php(287): Sloth\Plugin\Plugin->loadTaxonomies()
#4 /var/www/public/cms/wp-includes/class-wp-hook.php(311): WP_Hook->apply_filters()
#5 /var/www/public/cms/wp-includes/plugin.php(478): WP_Hook->do_action()
#6 /var/www/public/cms/wp-settings.php(540): do_action()
#7 /var/www/public/wp-config.php(13): require_once('/var/www/public...')
#8 /var/www/public/cms/wp-load.php(42): require_once('/var/www/public...')
#9 /var/www/sloth.php(22): include('/var/www/public...')
#10 {main}
(stored in /var/www//logs/exception--2020-04-14--20-37--eafbbf09cf.html)
If i'm on php 7.2 i get the error when trying to create a new module via vagrant ssh
php sloth.php create-module
if there are custom taxonomies.
If i'm on php 7.4 the error already loads on page load no matter which page 'm on
Wordpress function for password protected content doesn't work
Admin view shows too much information
ACF File
Getting attachments from models via ACF is unhandy.
I have to use xxx.acf.file('acf-field-name').url.
It would be better if it would work like images.
Layotter View not found on custom post type
Get layotter post_options
I am trying to get the layotter element options within a module. If i debug the result of $this->get( '_layotter.passed' );
i get the following:
class => "1/2" (3)
col_options => array ()
row_options => array (4)
larger_width => false
background_color => "bg-white" (8)
row_margin => "my-2" (4)
row_padding => "py-2 py-md-4" (12)
post_options => array ()
The post_option array should now contain a field, which should return an array of objects selected within the element options screen. But it does not.
How can i return the values of an element-options field within a module?
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.