Prestashop 1.7 / back office error 500 after activate module

PrestaShop 1.7.6.1 Everything worked until the ps_featuredproducts module was activated. After activation of the module I saw error 500. I set the debug mode (config/defines.inc.php): define(‘_PS_MODE_DEV_’, true); I couldn’t deactivate the ps_featuredproducts module so I cleared the cach. And it helped but I still see error 500 on admin page after turning off debug mode.…

Is there a way to extract a single post better than using get_posts()?

I have code like the following to extract data about a post: $args = array( ‘post_type’ => ‘products’, ‘numberposts’ => – 1, ‘orderby’ => ‘meta_value’, ‘meta_key’ => ‘release_date’, ‘order’ => ‘DESC’, ‘meta_query’ => array( array( ‘key’ => ‘status’, ‘value’ => ‘production’, ) ) ); $latest_products = get_posts($args); echo ‘Our latest product is ‘ . $latest_products[0]->post_title;…

wordpress-theme 2017: featured image behaviour: where to set the height of the featured image?

good day dear community, after having nailed down several issues with the set up of the theme twentyseventeen – the question today is: wordpress-theme 2017: featured image behaviour: where to set the height of the featured image!? Well while i was doing a little google-search i have found the following; I have been searching on…

How do you reorder an entity reference revisions field during hook_node_presave?

I am trying to reorder some paragraphs based on a text field within them on node save so the author does not need to maintain the alphabetical order manually, but when I save the node all values are lost. I tried matching the array from $node->get(‘field_paragraphs’)->getValue(), but that does not seem to work. function mymodule_node_presave(NodeInterface…

Don’t repeat yourself: Natural place for clculations on the FieldItemList of a custom FieldType wanted

I have a custom field type that contains a number field, among others. class MyFieldItem extends FieldItemBase { public static function propertyDefinitions($field_definition) { $properties = []; $properties[‘some_number’] = DataReferenceTargetDefinition::create( ‘integer’ ); … } … } I need the sum of all values of the property some_number. A function adding the numbers would look like this:…