Tagged: 

This topic contains 13 replies, has 5 voices, and was last updated by  hozefasmile 5 months, 3 weeks ago.

  • Author
    Posts
  • #6742

    zoker
    Participant

    Hi there,

    After updating, I still have these issue:

    PHP Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; Piklist_Universal_Widget has a deprecated constructor in /wp-content/plugins/piklist/includes/class-piklist-universal-widget.php on line 15

    PHP Warning: Invalid argument supplied for foreach() in /wp-content/plugins/piklist/parts/shared/widget-select.php on line 67

    PHP Warning: Illegal offset type in /wp-content/plugins/piklist/parts/shared/widget-select.php on line 67

    PHP Warning: Illegal offset type in isset or empty in /wp-content/plugins/piklist/parts/shared/widget-select.php on line 50

    And since then all my widgets are broken in frontend…

    Please fix!

    Thank you 🙂

  • #6745

    Steve
    Keymaster

    @zoker–

    If you open the file piklist/includes/class-piklist-universal-widget.php and change the beginning of line 60

    FROM
    public function Piklist_Universal_Widget

    TO
    public function __construct

    Does that fix the issue?

  • #6788

    zoker
    Participant

    That resolves one of the issues, but not all.

    Here is another issue:
    PHP Notice: Undefined index: render in /wp-content/plugins/piklist/includes/class-piklist-universal-widget.php on line 289

  • #6790

    Sergey Mochalov
    Participant

    Piklist last version.
    If activated piklist demo it breaks Customizer.
    Error in console Chrome:
    http://prntscr.com/bjnbot
    http://prntscr.com/bjncna

  • #7032

    zoker
    Participant

    @Steve No answer here?

    Still there issues
    Notice: Undefined index: render in /wp-content/plugins/piklist/includes/class-piklist-universal-widget.php on line 289
    Warning: Invalid argument supplied for foreach() in /wp-content/plugins/piklist/includes/class-piklist-universal-widget.php on line 289

  • #7037

    Steve
    Keymaster

    @zoker–

    This should have been fixed. I can’t reproduce. Can you email your plugin/theme to [email protected] ?

    When you test the built-in demos do they work?

  • #7200

    mcmaster
    Participant

    I just ran into the same problem when updating a site from Piklist 0.9.4v to 0.9.9.

    On the front end I get the following error messages:

    Notice: Undefined index: render in /Users/donna/Sites/oema/wp-content/plugins/piklist/includes/class-piklist-universal-widget.php on line 289
    
    Warning: Invalid argument supplied for foreach() in /Users/donna/Sites/oema/wp-content/plugins/piklist/includes/class-piklist-universal-widget.php on line 289

    In the sidebar part of the Widgets edit page, the widget type has been lost and I see the “Select a Widget” dropdown with these three error messages for each widget:

    Warning: Illegal offset type in isset or empty in /Users/donna/Sites/oema/wp-content/plugins/piklist/parts/shared/widget-select.php on line 50
    
    Warning: Illegal offset type in /Users/donna/Sites/oema/wp-content/plugins/piklist/parts/shared/widget-select.php on line 67
    
    Warning: Invalid argument supplied for foreach() in /Users/donna/Sites/oema/wp-content/plugins/piklist/parts/shared/widget-select.php on line 67

    There are three widgets, each with a text field, and two of them are now empty. The third still has a value.

    I’m working on it now; will update when I get it working again, and would welcome any suggestions. 😉

    Thanks,
    Donna

  • #7201

    mcmaster
    Participant

    What I’ve learned so far is that the serialized array is modified during the Piklist update. I’ve tried running it again from the original database a couple of times, and the update isn’t terminating, which leads me to believe that it probably didn’t terminate the first time and I just didn’t realize it.

    I need to head out now but tomorrow I’ll attach the parts/widgets files plus database for the widget fields before and after migration.

  • #7210

    mcmaster
    Participant

    Whenever Piklist prompts me to run the update, it runs for at least 15 minutes without terminating. I have repeated these steps half a dozen times, including once with all plugins disabled except for Piklist.

    I decided that the simplest solution is to delete the widgets and re-create them from scratch using Piklist 0.9.9.9. But I wanted you to be able see what needs fixing or test your latest code, so I cloned it to a test site and sent an email with credentials to [email protected].

    Donna

  • #7219

    mcmaster
    Participant

    Update: The update not terminating was a separate problem, not related to the widgets, and I’ve resolved it.

    I’m guessing that the widgets mess is related to the serialized string problem that has been so frustrating: https://piklist.com/support/topic/0-9-9-6-add-more-problem/
    This is because the serialized array that holds the three widget entries had indices of 2, 3, and 4. (See attached file.) My experience is that if they don’t run from 0 to n-1, they don’t work consistently. I tried editing the database entry to fix the indices but it didn’t help.

    The good news is that I was able to create a nice clean new set of widgets and all is well on my site. I will leave the testbed up for you.

  • #7220

    mcmaster
    Participant

    Oops it didn’t like my .sql upload; try this.

  • #7221

    mcmaster
    Participant

    Okay it didn’t like the text version either. Apologies as this zip file will probably have one of those MAC .DS_STORE files in it.

  • #7222

    mcmaster
    Participant

    Upload Errors:
    export_widget_record.sql: Sorry, this file type is not permitted for security reasons.

    Upload Errors:
    widget-before-update.txt: Sorry, this file type is not permitted for security reasons.

    Upload Errors:
    export_widget_record.sql.zip: Sorry, this file type is not permitted for security reasons.

    I give up.

  • #9263

    hozefasmile
    Participant

    Hi All,

    I am also facing this issue when tried to create a second widget with piklist.

    I am creating a site where I have created custom widget for navigation menu and recent post. After creating the second widget it shows and error message “Warning: Invalid argument supplied for foreach() in /myserverpath/wp-content/plugins/piklist/parts/shared/widget-select.php on line 67” , though its not showing on front end and there is no any serious issue, but there might be some coding issue in file “widget-select.php”

    But I found that if we create form file for each widget, (in my case I hadn’t created for recet post wdiget, as I don’t need any input) , the error get disappear itself.

    Just informing here because I think this post is related with this error.

You must be logged in to reply to this topic.