June 18, 2016 at 11:04 am #6742
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…
Thank you 🙂
June 18, 2016 at 8:51 pm #6745
If you open the file piklist/includes/class-piklist-universal-widget.php and change the beginning of line 60
public function Piklist_Universal_Widget
public function __construct
Does that fix the issue?
June 21, 2016 at 6:34 pm #6788
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
June 22, 2016 at 1:16 pm #6790
July 27, 2016 at 5:59 am #7032
@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
July 27, 2016 at 11:44 pm #7037
August 21, 2016 at 12:15 am #7200
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. 😉
August 21, 2016 at 1:06 am #7201
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.
August 21, 2016 at 9:38 pm #7210
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].
August 22, 2016 at 8:42 pm #7219
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.
August 22, 2016 at 8:43 pm #7220
Oops it didn’t like my .sql upload; try this.
August 22, 2016 at 8:45 pm #7221
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.
August 22, 2016 at 8:46 pm #7222
export_widget_record.sql: Sorry, this file type is not permitted for security reasons.
widget-before-update.txt: Sorry, this file type is not permitted for security reasons.
export_widget_record.sql.zip: Sorry, this file type is not permitted for security reasons.
I give up.
December 22, 2018 at 3:14 am #9263
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.