Skip Navigation

[Resolved] wordpress archive: Catchable fatal error: Object of class WP_Error could not be

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

This topic contains 6 replies, has 2 voices.

Last updated by Marisa 6 years, 2 months ago.

Assigned support staff: Luo Yang.

Author
Posts
#311926
loopbrokenerror.PNG

I am trying to: create a taxonomy archive that will display the post assigned to my custom post

I visited this URL:

I expected to see:

Instead, I got:

I see this error when trying to use views to create a taxonomy archive

Categories
Catchable fatal error: Object of class WP_Error could not be converted to string in /home/aistaging/public_html/demo5/wp-content/plugins/wp-views/inc/redesign/wpv-section-loop-selection.php on line 301

#312021

Luo Yang
Supporter

Languages: English (English ) Chinese (Simplified) (简体中文 )

Timezone: Asia/Hong_Kong (GMT+08:00)

Dear Marisa,

Please try this:
1) deactivate other plugins and switch to wordpress default theme,
2) enable wordpress debug mode, repeat the actions you mentioned above, and post the debug logs here.
https://toolset.com/documentation/user-guides/debugging-types-and-views/

PHP Debugging

In case you think that Types or Views are doing something wrong (what we call a bug), you should enable PHP error logging. Again, edit your wp-config.php file and add the following:

ini_set('log_errors',TRUE);
ini_set('error_reporting', E_ALL);
ini_set('error_log', dirname(__FILE__) . 'https://cdn.toolset.com/error_log.txt');
This will produce a file called ‘error_log.txt’ in your WordPress root directory. Make sure that the web server can create and write this file. If it cannot, use an FTP program to create the file and make it writable to Apache (normally, user www-data).

#312308
errorstillexists.PNG

all steps completed - error still exists.

#312336

Luo Yang
Supporter

Languages: English (English ) Chinese (Simplified) (简体中文 )

Timezone: Asia/Hong_Kong (GMT+08:00)

Could you duplicate same problem in a test site, and fill below private detail box with the login details and FTP access, we need debug it in a live website, thanks

#313371

btw, I am not 100% sure, but the problem seemed to crop up sometime after (not immediately when) I tried a plugin called wp no category base. This was the wrong plugin and not the one I thought I was installing (https://wordpress.org/plugins/wp-no-category-base/).

I meant to do wp remove category base.

When I uninstalled this plugin, I had 404 errors on all my pages. I refreshed permalinks and all errors went away.

But I still had a problem with the wordpress archive which is documented in this ticket.

#313595

Luo Yang
Supporter

Languages: English (English ) Chinese (Simplified) (简体中文 )

Timezone: Asia/Hong_Kong (GMT+08:00)

I can see the problem URL hidden link is displaying 404 error, is it a page or archive page?
I checked in the back-end, there isn't any page is using slug "news"
there is a category is using slug "news", the archive page URL should be this:
hidden link

Please check it.

#313782

Since the error message is gone on the archive page, in the admin. I'm marking this as resolved.