• Resolved randomblink

    (@randomblink)


    When users click on https://sushitraintulsaok.com/menu/ they get the following error code:

    Warning: Invalid argument supplied for foreach() in /home/sushitraintulsao/public_html/wp-content/plugins/food-and-drink-menu/views/View.Menu.class.php on line 284

    several times before the menu opens.

    Any idea what is going on?

    The page I need help with: [log in to see the link]

Viewing 6 replies - 1 through 6 (of 6 total)
  • Thread Starter randomblink

    (@randomblink)

    I have turned off all plugins but the menu plugin and still get this same error code.

    You have debug on, please review your wp-config.php file and turn off debug to display errors on the frontend first.

    Thread Starter randomblink

    (@randomblink)

    Thank you.
    Previous developer had turned on:
    error_reporting(E_ALL); ini_set(‘display_errors’, 1);

    So I commented that out too. Ugh.
    Thank you so much!

    Ok great, by the way, that warning error is happening because the prices are missing in the data. Plugin author need to apply a validation there before looping the prices.

    Plugin Support jaysupport

    (@jaysupport)

    Hi Vijay,

    Thank you for your input. Would you be able to describe to me how I can recreate the error? You definitely don’t have to specify a price for a menu item, and it shouldn’t display an error/warning if you don’t.

    I was seeing the same error, along with an undefined property error for each menu item.

    Notice: Undefined property: fdmViewItem::$prices in /home/***/wp-content/plugins/food-and-drink-menu/views/View.Menu.class.php on line 286

    Warning: Invalid argument supplied for foreach() in /home/***/wp-content/plugins/food-and-drink-menu/views/View.Menu.class.php on line 286

    No menu items have prices on this particular site.

    Under Settings > Functionality, the Disable Price was in the ON position, disabling prices. When I move the Disable Price slider to OFF, the errors disappear.

    When I move both the Disable Price and Disable Microdata sliders to ON, the errors disappear.

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Warning: Invalid argument supplied for foreach() in /home//publi’ is closed to new replies.