Skip Navigation

[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.

Sun Mon Tue Wed Thu Fri Sat
- 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 -
- 13:00 – 18:00 13:00 – 18:00 13:00 – 18:00 14:00 – 18:00 13:00 – 18:00 -

Supporter timezone: America/Jamaica (GMT-05:00)

This topic contains 11 replies, has 4 voices.

Last updated by Shane 3 years, 3 months ago.

Assisted by: Shane.

Author
Posts
#2133761
Screenshot 2021-08-04 at 14.16.28.png

Hi

I am trying to edit a page that has a Toolset view on it but it comes up blank. One time I got a critical error message.

I looked in the javascript console errors and can see an error message, see attached screenshot.

Editing any other page works fine.

Any ideas why I can't edit this page?

#2133789

Nigel
Supporter

Languages: English (English ) Spanish (Español )

Timezone: Europe/London (GMT+00:00)

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:

define('WP_DEBUG', true);
define('WP_DEBUG_LOG', true);
define('WP_DEBUG_DISPLAY', false);
define('WP_DISABLE_FATAL_ERROR_HANDLER',true);

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.

#2134687

Hey

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?

#2134727

Nigel
Supporter

Languages: English (English ) Spanish (Español )

Timezone: Europe/London (GMT+00:00)

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).

#2134979

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.

#2140961

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.

#2141121

Yes please provide staging login info and I'll take a closer look.

#2143859

I tried logging in with these credentials but saw the following error:
LOGIN BLOCKED: 2FA is required to be active on all administrator accounts.

Can you check?

#2149527

Sorry about that not had access to a computer to easily sort this, its now disabled so you should be able to login. 🙂

#2151335

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hi Matthew,

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.

Thanks,
Shane

#2151737

The page ID is 207, unsure on view ID as can't get to edit the page, it is a view created on the page using the block editor.

#2151879

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hi Matthew,

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

Thanks,
Shane