Tagged: update enfold
-
AuthorPosts
-
December 10, 2015 at 12:40 am #550047
Hi,
today I have made the update to the newest version (3.4.6), using WP 4.4.
Now I get on two sub pages the following php problems:First page error:
Notice: Undefined offset: 1 in /var/www/clients/client19/web127/web/wp-content/themes/enfold/framework/php/class-form-generator.php on line 595
Second page error:
This page is just blank.
In the editor I get the error:
Notice: Trying to get property of non-object in /var/www/clients/client19/web127/web/wp-content/plugins/schema-creator/schema-creator.php on line 1397
Many thanks.
December 10, 2015 at 1:58 am #550068Hi 364Grad!
Let’s try the following.
1. Deactivate all plugins.
2. Completely delete Enfold from your WordPress theme directory before downloading + uploading a fresh copy from themeforest.
If your still having the problem after doing the above two steps then send us a WordPress login and we’ll take a look.
Regards,
ElliottDecember 12, 2015 at 3:13 pm #551441Hi,
I have tried you above listed steps, but have the same problems.
I also used a new copy from themeforest.
I created a admin login for you.
Many thanks.Regards
TomDecember 14, 2015 at 8:36 am #552011Hi,
I couldn’t see any error message on either the front- or back-end. Where are you seeing them?
Regards,
RikardDecember 14, 2015 at 2:14 pm #552259See also previous posts. The two pages are showing the errors.
Testing with FF and Chrome.December 15, 2015 at 4:39 am #552793Hey!
It’s something to do with your select elements but I’m not sure what it could be. I tested the code out on my XAMPP setup and it seems to be working fine.
They are just notices and not errors though so if you want you can turn off WordPress debugging and they should go away.
Best regards,
ElliottDecember 15, 2015 at 5:34 pm #553183Hi,
I’ve deactivate all plugins and completely delete Enfold from my WordPress theme directory before downloading + uploading a fresh copy from themeforest but I get the same error “Notice: Undefined offset: 1 in /wp-content/themes/enfold/framework/php/class-form-generator.php on line 595”. On line 595 it says “$key = trim($suboptions[1]);” which doesn’t exists.
$suboptions = explode('|',$option); if(is_array($suboptions)) { $key = trim($suboptions[1]); $value = trim($suboptions[0]); }
I’m not an experienced programmer but could it be that “$suboptions = explode(‘|’,$option);” always returns an array even though $option is a single string (single value from select options submitted via the admin-panel) without ‘|’ in i?. Because the array has only one value this causes $suboptions[1] to generate the error.
I’ve replaced line 595 with
$key = isset($suboptions[1]) ? trim($suboptions[1]) : trim($suboptions[0]);
and that solves it for now.
It also might be a solution to remove all lines mentioned above since is_array($suboptions)) is always true and $suboptions[1] is always empty.NB. If I would turn off WordPress debugging the notice goes away but in that case $suboptions[1] (used as the value for the option in the dropdownmenu) is empty and this causes the value not to be sent when submitting the form.
Best regards,
EmazingDecember 15, 2015 at 8:34 pm #553251Hi,
Problem solved I guess. $suboptions[1] did not have a value because I (we?) didn’t enter it when composing the form.
When adding a Select Element to a form the example next to the “Form Element Options” says you have to enter the options as Option 1, Option 2, Option 3 (comma separated) but the code expects a comma separated key-value pair. You should enter the options as Option 1|option1, Option 2|option2, Option 3|option3. Is this correct?
Best regards,
EmazingDecember 17, 2015 at 3:29 am #554113Hi!
It should just be comma separated.
test, test1, test2
You can see where we split them on line 565. Not really sure why the pipe is there for. It seems to have something to do with sub options but I don’t think we have any features for that currently.
Cheers!
Elliott- This reply was modified 9 years ago by Elliott.
-
AuthorPosts
- You must be logged in to reply to this topic.