Undefined index in wri-pro.php

Home Page Forums WP Related Items Undefined index in wri-pro.php

This topic contains 7 replies, has 2 voices, and was last updated by  WebshopLogic 10 months, 3 weeks ago.

Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #4269

    Denis
    Participant

    Hi

    Just purchased the WP Related items Pro and while debuging the website because of an Error 500 (which was not related to this plugin), I’ve seen PHP notices relating to undefined index in wri-pro.php on lines 546 and 564.

    There are around 30-40 error lines like these that are added within the same second of a website refresh:

    [15-Sep-2016 15:43:58 UTC] PHP Notice:  Undefined index: wri_used_posttypes in /var/www/vhosts/website_url/wp-content/plugins/wp-related-items-pro/wri-pro.php on line 546
    [15-Sep-2016 15:43:58 UTC] PHP Notice:  Undefined index: wri_used_posttypes in /var/www/vhosts/website_url/wp-content/plugins/wp-related-items-pro/wri-pro.php on line 564

    It would be nice to fix these undefined index and help get a cleaner debug.log ;)

    Thanks

    #4284

    WebshopLogic
    Keymaster

    Dear Denis!

    Thank you for your purchase.
    We are examining what is the problem, and give you a feedback soon.

    Peter Rath,
    WebshopLogic

    #4285

    WebshopLogic
    Keymaster

    Hi Denis!

    Please check if at least one post type is set in “Post types used by WRI” field on General tab of WP Related Items (WRI) Settings page.

    I suppose that there is not any selected post type, this may cause this problem.

    Tanks,
    Peter

    #4287

    Denis
    Participant

    Hi Peter

    I already had Posts and Products that were selected from the moment I did the initial setup. That’s not it…

    #4328

    WebshopLogic
    Keymaster

    It is very strange. This error can occur only if something wrong with the plugin settings, because this part of the plugin read the saved plugin settings, and found that it does not contain the “wri_used_posttypes” setting (the checkboxes that I mentioned above).

    Please attache a screenshot about the General tab, the Post tab and Product tab of WP Related Items settings page, maybe this help to find the reason of it.

    You can also try to reinstall (inactivate the plugin, then overwrite the files and activate it again), maybe something went wrong during installation.
    Then please save again the plugin settings, so change something and save it.

    Thanks,
    Peter

    #4334

    Denis
    Participant

    Ok, errors have changed now that I did a few things…. so here is what I did:
    – Disabled the PlugIn
    – Uploaded all the plugin files overwriting any existing one
    – Activated the plugin.
    – Went to WRI Pro settings
    – Unchecked the Enable WRI plugin
    – Saved settings
    – Checked the Enable WRI plugin
    – Saved settings

    then I had a few PHP notice, one of them was about cross_taxonomy.php so I went to the “Related Types” tab to do:
    – I checked the ‘Product label’ in the Show selected cross taxonomy metaboxes on Posts admin page (pro)
    – I checked the ‘Labels’ in the Show selected cross taxonomy metaboxes on Products admin page (pro)
    – Saved the settings

    Now the cross_taxonomy.php notice were gone and now I’m only left with these errors:

    When loading a post, I get:

    [21-Sep-2016 13:17:18 UTC] PHP Notice:  The called constructor method for WP_Widget in WRI_Widget is <strong>deprecated</strong> since version 4.3.0! Use <pre>__construct()</pre> instead. in /var/www/vhosts/website_url/wp-includes/functions.php on line 3767
    [21-Sep-2016 13:17:18 UTC] PHP Notice:  Array to string conversion in /var/www/vhosts/website_url/wp-content/plugins/wp-related-items-pro/wri-pro.php on line 426
    [21-Sep-2016 13:17:18 UTC] PHP Notice:  Array to string conversion in /var/www/vhosts/website_url/wp-content/plugins/wp-related-items-pro/wri-pro.php on line 426
    [21-Sep-2016 13:17:18 UTC] PHP Notice:  Array to string conversion in /var/www/vhosts/website_url/wp-content/plugins/wp-related-items-pro/wri-pro.php on line 426
    [21-Sep-2016 13:17:18 UTC] PHP Notice:  Array to string conversion in /var/www/vhosts/website_url/wp-content/plugins/wp-related-items-pro/wri-pro.php on line 426
    [21-Sep-2016 13:17:18 UTC] PHP Notice:  Array to string conversion in /var/www/vhosts/website_url/wp-content/plugins/wp-related-items-pro/wri-pro.php on line 426
    [21-Sep-2016 13:17:18 UTC] PHP Notice:  get_currentuserinfo is <strong>deprecated</strong> since version 4.5.0! Use wp_get_current_user() instead. in /var/www/vhosts/website_url/wp-includes/functions.php on line 3707
    [21-Sep-2016 13:17:19 UTC] PHP Notice:  The called constructor method for WP_Widget in WRI_Widget is <strong>deprecated</strong> since version 4.3.0! Use <pre>__construct()</pre> instead. in /var/www/vhosts/website_url/wp-includes/functions.php on line 3767

    After loading a post in admin and trying to add a manual relationship to a product, I get:

    [21-Sep-2016 13:17:44 UTC] PHP Notice:  The called constructor method for WP_Widget in WRI_Widget is <strong>deprecated</strong> since version 4.3.0! Use <pre>__construct()</pre> instead. in /var/www/vhosts/website_url/wp-includes/functions.php on line 3767
    [21-Sep-2016 13:17:45 UTC] PHP Notice:  Undefined index: id_number in /var/www/vhosts/website_url/wp-content/plugins/wp-related-items-pro/wri-admin-page.php on line 1251
    [21-Sep-2016 13:17:45 UTC] PHP Notice:  Undefined index: id_number in /var/www/vhosts/website_url/wp-content/plugins/wp-related-items-pro/wri-admin-page.php on line 1251
    [21-Sep-2016 13:17:46 UTC] PHP Notice:  The called constructor method for WP_Widget in WRI_Widget is <strong>deprecated</strong> since version 4.3.0! Use <pre>__construct()</pre> instead. in /var/www/vhosts/website_url/wp-includes/functions.php on line 3767
    [21-Sep-2016 13:17:48 UTC] PHP Notice:  The called constructor method for WP_Widget in WRI_Widget is <strong>deprecated</strong> since version 4.3.0! Use <pre>__construct()</pre> instead. in /var/www/vhosts/website_url/wp-includes/functions.php on line 3767
    [21-Sep-2016 13:17:50 UTC] PHP Notice:  The called constructor method for WP_Widget in WRI_Widget is <strong>deprecated</strong> since version 4.3.0! Use <pre>__construct()</pre> instead. in /var/www/vhosts/website_url/wp-includes/functions.php on line 3767
    [21-Sep-2016 13:17:51 UTC] PHP Notice:  The called constructor method for WP_Widget in WRI_Widget is <strong>deprecated</strong> since version 4.3.0! Use <pre>__construct()</pre> instead. in /var/www/vhosts/website_url/wp-includes/functions.php on line 3767
    [21-Sep-2016 13:17:52 UTC] PHP Notice:  The called constructor method for WP_Widget in WRI_Widget is <strong>deprecated</strong> since version 4.3.0! Use <pre>__construct()</pre> instead. in /var/www/vhosts/website_url/wp-includes/functions.php on line 3767
    [21-Sep-2016 13:17:53 UTC] PHP Notice:  The called constructor method for WP_Widget in WRI_Widget is <strong>deprecated</strong> since version 4.3.0! Use <pre>__construct()</pre> instead. in /var/www/vhosts/website_url/wp-includes/functions.php on line 3767
    [21-Sep-2016 13:17:54 UTC] PHP Notice:  The called constructor method for WP_Widget in WRI_Widget is <strong>deprecated</strong> since version 4.3.0! Use <pre>__construct()</pre> instead. in /var/www/vhosts/website_url/wp-includes/functions.php on line 3767
    [21-Sep-2016 13:17:55 UTC] PHP Notice:  The called constructor method for WP_Widget in WRI_Widget is <strong>deprecated</strong> since version 4.3.0! Use <pre>__construct()</pre> instead. in /var/www/vhosts/website_url/wp-includes/functions.php on line 3767
    [21-Sep-2016 13:17:56 UTC] PHP Notice:  The called constructor method for WP_Widget in WRI_Widget is <strong>deprecated</strong> since version 4.3.0! Use <pre>__construct()</pre> instead. in /var/www/vhosts/website_url/wp-includes/functions.php on line 3767
    [21-Sep-2016 13:17:57 UTC] PHP Notice:  The called constructor method for WP_Widget in WRI_Widget is <strong>deprecated</strong> since version 4.3.0! Use <pre>__construct()</pre> instead. in /var/www/vhosts/website_url/wp-includes/functions.php on line 3767
    [21-Sep-2016 13:17:58 UTC] PHP Notice:  The called constructor method for WP_Widget in WRI_Widget is <strong>deprecated</strong> since version 4.3.0! Use <pre>__construct()</pre> instead. in /var/www/vhosts/website_url/wp-includes/functions.php on line 3767
    [21-Sep-2016 13:17:59 UTC] PHP Notice:  The called constructor method for WP_Widget in WRI_Widget is <strong>deprecated</strong> since version 4.3.0! Use <pre>__construct()</pre> instead. in /var/www/vhosts/website_url/wp-includes/functions.php on line 3767
    [21-Sep-2016 13:18:11 UTC] PHP Notice:  The called constructor method for WP_Widget in WRI_Widget is <strong>deprecated</strong> since version 4.3.0! Use <pre>__construct()</pre> instead. in /var/www/vhosts/website_url/wp-includes/functions.php on line 3767
    

    Some parts in the screenshots are French:
    ‘Articles’ is Posts
    ‘Produits’ is Products

    Attachments:
    You must be logged in to view attached files.
    #4357

    WebshopLogic
    Keymaster

    Thank you for the detailed information.

    As I see it, the original problem is solved.
    All of the messages are notices, they do not have affect on the normal functionality, so you can use the plugin. And we will solve them of course.

    You can use the plugin now? Or is there any problem that prevents using the plugin?

    (I know you have reported another issue about manual relationships, we are handling it independently)

    #4375

    WebshopLogic
    Keymaster

    The problems are fixed in the new v1.2.2 version .
    It can be downloaded from My Account menu of webshoplogic.com

Viewing 8 posts - 1 through 8 (of 8 total)

You must be logged in to reply to this topic.