• Resolved cgarretar

    (@cgarretar)


    After update WordPress to the last version, I cannot create or duplicate any location (multiple locations), it give me this error:

    Cannot use object of type WP_Error as array in /var/www/vhosts/xxxx.com/wp-content/plugins/restaurant-reservations/includes/MultipleLocations.class.php on line 149, referer: https://xxxx.com/wp-admin/edit.php?post_type=location

    Any help will be appreciated ??

    Thank you in advance.

Viewing 7 replies - 1 through 7 (of 7 total)
  • Hi cgarretar,

    I’m sorry for the delay in responding. With the maintenance work on the support forums over the weekend, I’m just noticing your question now.

    This particular error message comes from the integration with my Restaurant Reservations plugin. Specifically, it looks like it’s failing to create a location taxonomy term which matches your location.

    https://github.com/NateWr/restaurant-reservations/blob/master/includes/MultipleLocations.class.php#L139-L149

    Obviously, this error should be handled more gracefully. But it seems like there may be some data problems lurking in here. My first guess would be that you’ve got an existing taxonomy term of the same name as the one that’s being created.

    This is likely to arise if you had a location of a name, and then tried to create another location of the same name (possibly having deleted the previous location).

    I’ll need to think of a workaround for this.

    Are you able to work with code at all? If so, I’d have you insert a single line to report more information about the error which could help debugging.

    Also, you mention “duplicating” a location. Can you describe more what’s going on here? Are you using a plugin to duplicate posts? I’m wondering if that might be causing some part of the problem.

    Thread Starter cgarretar

    (@cgarretar)

    Don’t worry. I’ve been reviewing taxonomies, but I have no created with those names. We are pages, however, I have renamed but still showing the error.

    What I did was turn off the Restaurant Reservations plugin and from there, worked normally, it has given no mistake, both to create a new location, or to edit them. I re-activate the plugin and everything seems fine.

    Thanks for your help, we continue to work ??

    Hi cgarretar,

    If you create locations with Business Profile while the Restaurant Reservations plugin is deactivated, the location taxonomy terms won’t be created.

    You can get around this by simply updating each location once you’ve activated the Restaurant Reservations plugin. Updating will create a taxonomy term if none exists.

    Hi,
    I have this error on my site.
    Here is the link on which the error is found. https://www.ericgelman.com/houselist/come-home-san-anselmo/

    Fatal error: Cannot use object of type WP_Error as array in /home/ericgelman1ab25/public_html/wp-content/themes/gelman/single-houselist.php on line 18

    Please advise on how to fix the issue.

    What’s your code look like here:

    /home/ericgelman1ab25/public_html/wp-content/themes/gelman/single-houselist.php on line 18

    Here is the screenshot of the code : https://prntscr.com/fn86nt

    Hi @klaborate,

    That code isn’t related to my plugin in any way. It’s part of your theme and appears to be connected to some media category functionality. I’d recommend reaching out to your theme developer for help.

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Cannot use object of type WP_Error as array in’ is closed to new replies.