[Resolved] Can't edit page that has Toolset view on it
This support ticket is created 3 years, 4 months ago. There's a good chance that you are reading advice that it now obsolete.
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.
No supporters are available to work today on Toolset forum. Feel free to create tickets and we will handle it as soon as we are online. Thank you for your understanding.
A critical error message like that means that there has been a fatal PHP error (a JavaScript error wouldn't break the page in the same way, and that error may be because the page didn't load completely because of the PHP error).
Can you check your debug log for details of the error?
If you haven't already, turn on the debug log by editing your wp-config.php file and change the line with WP_DEBUG like so:
That will create a debug.log file in your /wp-content/ directory which you can examine in any text editor.
Try editing the page with the View again and then inspect the log.
There is a good chance that such an error may be caused by a compatibility issue, so you may want to fast forward and test that, too, by disabling all non-Toolset plugins and switching theme, then re-testing.
I have done this and seems like a repeating error in the logs.
Please see a snippet of the error below:
[05-Aug-2021 12:04:49 UTC] PHP Notice: is_archive was called incorrectly. Conditional query tags do not work before the query is run. Before then, they always return false. Please see Debugging in WordPress for more information. (This message was added in version 3.1.0.) in /home/567425.cloudwaysapps.com/redacted/public_html/wp-includes/functions.php on line 5535
[05-Aug-2021 12:04:49 UTC] PHP Notice: is_home was called incorrectly. Conditional query tags do not work before the query is run. Before then, they always return false. Please see Debugging in WordPress for more information. (This message was added in version 3.1.0.) in /home/567425.cloudwaysapps.com/redacted/public_html/wp-includes/functions.php on line 5535
[05-Aug-2021 12:04:49 UTC] PHP Notice: is_search was called incorrectly. Conditional query tags do not work before the query is run. Before then, they always return false. Please see Debugging in WordPress for more information. (This message was added in version 3.1.0.) in /home/567425.cloudwaysapps.com/redacted/public_html/wp-includes/functions.php on line 5535
[05-Aug-2021 12:04:49 UTC] PHP Notice: is_archive was called incorrectly. Conditional query tags do not work before the query is run. Before then, they always return false. Please see Debugging in WordPress for more information. (This message was added in version 3.1.0.) in /home/567425.cloudwaysapps.com/redacted/public_html/wp-includes/functions.php on line 5535
[05-Aug-2021 12:04:49 UTC] PHP Notice: is_home was called incorrectly. Conditional query tags do not work before the query is run. Before then, they always return false. Please see Debugging in WordPress for more information. (This message was added in version 3.1.0.) in /home/567425.cloudwaysapps.com/redacted/public_html/wp-includes/functions.php on line 5535
[05-Aug-2021 12:04:49 UTC] PHP Notice: is_search was called incorrectly. Conditional query tags do not work before the query is run. Before then, they always return false. Please see Debugging in WordPress for more information. (This message was added in version 3.1.0.) in /home/567425.cloudwaysapps.com/redacted/public_html/wp-includes/functions.php on line 5535
[05-Aug-2021 12:04:49 UTC] PHP Notice: is_archive was called incorrectly. Conditional query tags do not work before the query is run. Before then, they always return false. Please see Debugging in WordPress for more information. (This message was added in version 3.1.0.) in /home/567425.cloudwaysapps.com/redacted/public_html/wp-includes/functions.php on line 5535
[05-Aug-2021 12:04:49 UTC] PHP Notice: is_home was called incorrectly. Conditional query tags do not work before the query is run. Before then, they always return false. Please see Debugging in WordPress for more information. (This message was added in version 3.1.0.) in /home/567425.cloudwaysapps.com/redacted/public_html/wp-includes/functions.php on line 5535
[05-Aug-2021 12:04:49 UTC] PHP Notice: is_search was called incorrectly. Conditional query tags do not work before the query is run. Before then, they always return false. Please see Debugging in WordPress for more information. (This message was added in version 3.1.0.) in /home/567425.cloudwaysapps.com/redacted/public_html/wp-includes/functions.php on line 5535
[05-Aug-2021 12:05:01 UTC] PHP Fatal error: Allowed memory size of 536870912 bytes exhausted (tried to allocate 20480 bytes) in /home/567425.cloudwaysapps.com/redacted/public_html/wp-includes/class-wp-term.php on line 198
[05-Aug-2021 12:05:01 UTC] PHP Notice: is_archive was called incorrectly. Conditional query tags do not work before the query is run. Before then, they always return false. Please see Debugging in WordPress for more information. (This message was added in version 3.1.0.) in /home/567425.cloudwaysapps.com/redacted/public_html/wp-includes/functions.php on line 5535
[05-Aug-2021 12:05:01 UTC] PHP Notice: is_home was called incorrectly. Conditional query tags do not work before the query is run. Before then, they always return false. Please see Debugging in WordPress for more information. (This message was added in version 3.1.0.) in /home/567425.cloudwaysapps.com/redacted/public_html/wp-includes/functions.php on line 5535
[05-Aug-2021 12:05:01 UTC] PHP Notice: is_search was called incorrectly. Conditional query tags do not work before the query is run. Before then, they always return false. Please see Debugging in WordPress for more information. (This message was added in version 3.1.0.) in /home/567425.cloudwaysapps.com/redacted/public_html/wp-includes/functions.php on line 5535
Let me know your thoughts on this and how we can resolve?
I've seen something similar before with the notices—it occurs because some 3rd party code triggers the pre_get_posts hook much earlier in the loading sequence than expected—and we have a ticket to solve that.
But it doesn't affect the functionality of your site, and in particular it doesn't account for the fatal error which your original screenshot indicates.
Delete your debug.log so that you can start again with a clean log, disable all non-Toolset plugins and switch theme so that we can focus on the reported issue, and try editing the page with a View again. If it works you won't see anything in the debug.log and the fault occurs because of some conflict with 3rd party code (which you can identify by re-activating plugins and your theme). If it doesn't work and you still have the error, you'll see details in the debug.log (which now won't be cluttered with those PHP notices).
Hi, I wanted to make sure you had received Nigel's reply and also note that if the View was built in the legacy View editor, it might make sense to edit that View and ensure that it does not produce an infinite loop. For example, if a Content Template is applied to this Page, and also inserted inside the View somehow using a shortcode, that would result in an infinite loop and potentially crash the editor page like this.
This would require just a quick check in the legacy Views editor, so I thought it worth mentioning here.
I have created a staging site now. Deactivated all plugins same issue. Deactivated the theme and I CAN then edit it. I am using the GeneratePress theme.
I then reactivated all plugins (apart from GP Premium as thats linked to GeneratePress theme) and it stopped working again.
So it doesn't seem like there is a clear link with GeneratePress. But deactivated all plugins and switching to the default theme does work, but just deactivated plugins does not.
@Christian its not using the legacy View editor much. Using the block editor for the main view and a legacy view for a small part. The reason I need to edit it actually is because the legacy view has stopped working correctly. It did work fine but I believe an update of either Toolset or another plugin caused the results to not display correctly (the flag icons for a post).
Any ideas how we can fix?
Let me know if you would like the login info to the staging site to take a look at this.
Christian is currently on vacation at the moment so I will be doing the follow up here for this ticket.
I logged into the site successfully and checked on one of your views, however I wasn't able to see the issue being described. Can you let me know if it occurs on a particular view ? If so can you send me the link to that view or the name of the view.
I took a copy of the site to test here locally and the issue still occurs, however it gave me a bit more insider. I removed the view from the page through the database and the error was still occurring.
[05-Aug-2021 12:05:01 UTC] PHP Fatal error: Allowed memory size of 536870912 bytes exhausted (tried to allocate 20480 bytes) in /home/567425.cloudwaysapps.com/redacted/public_html/wp-includes/class-wp-term.php on line 198
What I ended up doing was to increase the wordpress memory limit from the 256m that you had set to 1024M. The page is now loading. hidden link