Viewing 16 posts - 1 through 16 (of 16 total)
  • Author
    Posts
  • #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?

    #1022117

    nessuna risposta?

    #1022210

    che senso ha pagare per avere un supporto che in realtà non esiste?

    #1022349

    Hi 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,
    Victoria

    #1022660

    ecco a lei. Grazie mille

    #1023113

    Hi,

    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,
    Rikard

    #1023206

    nel back-end sulla pagina di impostazione del tema enfold. Inoltre non mi salva il private token.

    #1023905

    Hi 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,
    Victoria

    #1025951

    Hi,
    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.

    #1027390

    Hi,

    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,
    Ismael

    #1029352

    Hi 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
    Anna

    #1029441

    Hi Anna,

    Great, glad you got it working and thanks for the feedback :-)

    Best regards,
    Rikard

    #1036136

    Do 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.
    #1036449

    Hi,

    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,
    Ismael

    #1040707

    Thank you Ismael,

    The solution given worked for me too.

    Cheers
    Daniel

    #1041071

    Hi,


    @Dewdan
    : Thanks for the confirmation. :)

    Best regards,
    Ismael

Viewing 16 posts - 1 through 16 (of 16 total)
  • You must be logged in to reply to this topic.