-
AuthorPosts
-
October 16, 2018 at 10:32 am #1022089
Salve, ho aggiornato alla versione 4.5 mi genera questo messaggio: Warning: array_flip(): Can only flip STRING and INTEGER values! in /web/htdocs/www.mysite.it/home/wp-content/themes/enfold/framework/php/class-htmlhelper.php on line 1571
Come risolvere?
October 16, 2018 at 11:53 am #1022117nessuna risposta?
October 16, 2018 at 2:26 pm #1022210che senso ha pagare per avere un supporto che in realtà non esiste?
October 16, 2018 at 7:37 pm #1022349Hi savino1981,
Can you give us temporary admin access to your website in the private content box below, so that we can have a closer look?
Best regards,
VictoriaOctober 17, 2018 at 10:16 am #1022660ecco a lei. Grazie mille
October 18, 2018 at 4:35 am #1023113Hi,
Thanks for the login details, though I can’t see any warnings on the front- or backend. Where are you seeing it? Please note that this will likely not affect any functionality on your site.
Best regards,
RikardOctober 18, 2018 at 9:06 am #1023206nel back-end sulla pagina di impostazione del tema enfold. Inoltre non mi salva il private token.
October 19, 2018 at 12:49 pm #1023905Hi savino1981,
Those are warnings, the token is saved and it is working. You need to disable debug info display, here is how to do it
If you need further assistance please let us know.
Best regards,
VictoriaOctober 24, 2018 at 3:59 pm #1025951Hi,
Having quite a few of Enfold instances installed and love the theme!
In my humble opinion, disabling WP_DEBUG doesn’t solve the issue, it just doesn’t show it!
It would be nice to know where is this bug originated and how to solve it.October 29, 2018 at 7:43 am #1027390Hi,
Thanks for the update. You can edit the framework > php > class-htmlhelper, line 1570:
$locations = get_registered_nav_menus(); $menu_locations = array_flip( get_nav_menu_locations() );
Replace it with:
$locations = get_registered_nav_menus(); $nav_menu = get_nav_menu_locations(); foreach($nav_menu as $key => $value) { unset($nav_menu[$key]); $nav_menu[$value] = $key; } $menu_locations = $nav_menu;
Let us know if it helps.
Best regards,
IsmaelNovember 2, 2018 at 9:55 pm #1029352Hi Support,
I got the same warning on one of the sites that updated to 4.5 and with token added.
The solution provided by @Ismael works.
Thanks
AnnaNovember 3, 2018 at 7:59 am #1029441Hi Anna,
Great, glad you got it working and thanks for the feedback :-)
Best regards,
RikardNovember 21, 2018 at 4:12 pm #1036136Do I have to replace just
$locations = get_registered_nav_menus(); $menu_locations = array_flip( get_nav_menu_locations() );
with the other code or do I have to replace even line
$nav_menus = wp_get_nav_menus();
in line 1572- This reply was modified 6 years ago by Oversberg.
November 22, 2018 at 11:33 am #1036449Hi,
Look for these lines:
$menu_locations = array_flip( get_nav_menu_locations() ); $nav_menus = wp_get_nav_menus();
And replace it with the modification:
$nav_menus = wp_get_nav_menus(); /** * array_flip does not work because plugins like <a href='http://bit.ly/kwpml' target='_blank' rel="nofollow">WPML</a> might return '' or null for value which throws a warning * * $menu_locations = array_flip( get_nav_menu_locations() ); */ $menu_locations = array(); $temp = get_nav_menu_locations(); foreach ( $temp as $loc => $term_id ) { if( is_numeric( $term_id ) && ( $term_id > 0 ) ) { $menu_locations[ $term_id ] = $loc; } }
Best regards,
IsmaelDecember 4, 2018 at 1:05 pm #1040707Thank you Ismael,
The solution given worked for me too.
Cheers
DanielDecember 5, 2018 at 5:17 am #1041071 -
AuthorPosts
- You must be logged in to reply to this topic.