[Resolved] Receiving PHP Error views/invalidator(.)php on line 274'
This thread is resolved. Here is a description of the problem and solution.
Problem:
The customer reported a PHP error originating from views/invalidator.php on line 274. Additionally, they experienced issues with the Block Editor for CPTs and image uploading. Debugging revealed these issues could be related to cached views in Toolset and the latest WordPress update to version 6.7.
Solution:
1- Cached Views Issue:
Enabled the legacy Views interface following Toolset’s documentation on enabling legacy views. Cleared the cached views, which resolved the initial PHP error.
2- Image issue fix:
We released hotfixes for:
- Toolset Blocks 1.6.18
- Toolset Access 2.9.2
Advised the customer to update to these versions after creating a full backup.
[proxy_fcgi:error [pid 2177504:tid 2177589 [client 40.77.167.72:0 AH01071: Got error 'PHP message: PHP Warning: array_intersect(): Expected parameter 1 to be an array, string given in /home/334869.cloudwaysapps.c............HP message: PHP Warning: array_intersect(): Expected parameter 1 to be an array, string given in /home/334869.cloudwaysapps.com/tupcnjgsbk/public_html/wp-content/plugins/toolset-blocks/application/controllers/cache/views/invalidator.php on line 274'
I checked it and we had other users reporting this issue in the past, they've been all fixed with the following steps:
- Please check which view is throwing the error in question.
- Please go to WP Admin -> Toolset -> Views and use the clear cache button next to this view.
After this, the error you mentioned, should be fixed.
Please give it a try and let us know the results.
Mateus
1. There is no such thing as Views in the Navigation of Toolset now, probably because it is replaced by Blocks now. Anyhow, I couldn't find it. Screenshot attached.
2. My Block Editor is also not working with CPTs.
2. I asked my hosting provider to me provide me with the list of most resource exhausting scripts and here they are,
Can you please share the steps to replicate the issue, or a link to a page where it happens.
Also, it looks like the credentials you shared previously were deleted from our system due to a security routine and I can no longer see them.
I would like to request temporary access (wp-admin and FTP) to your site again to take better look at the issue. You will find the needed fields for this below the comment area when you log in to leave your next reply. The information you will enter is private which means only you and I can see and have access to it.
Our Debugging Procedures
I will be checking various settings in the backend to see if the issue can be resolved. Although I won't be making changes that affect the live site, it is still good practice to backup the site before providing us access. In the event that we do need to debug the site further, I will duplicate the site and work in a separate, local development environment to avoid affecting the live site.
- Please make a backup of site files and database before providing us access.
- If you do not see the wp-admin/FTP fields this means your post & website login details will be made PUBLIC. DO NOT post your website details unless you see the required wp-admin/FTP fields. If you do not, please ask me to enable the private box. The private box looks like this: hidden link
Please, let me know if you need any additional details. Have a nice day.
After that the menu Toolset > Views became available, nothing will change on how you work with Toolset, just enabled this extra options so you can see the views(even the ones created with blocks) from that listing perspective.
After that I found that there were many cached views, I clear all of them and tested it again and I'm no longer able to replicate the issue.
Can you please test it again and confirm it is fixed?
I'm debugging it but so far I couldn't find a solution.
I'd like to ask permission to make a copy/staging version of your site where I can debug this closely without affecting the live site.
I'll make sure to delete this copy as soon as we get this issue fixed.
I'm afraid of debugging directly on the live site and cause issues to your visitors. Also, it is important to test a different setup as part of the troubleshooting.
I tried to migrate the site to a staging environment on our servers using Cloudways Migrator, but unfortunately, the migration failed. Additionally, I tried creating a package/copy of the site using backup plugins such as the Duplicator; however, due to the size of the site, these attempts have also been unsuccessful, even when excluding large folders like the uploads folder.
If possible, could you share a package of the site with us or provide access to a staging environment on your end? I have enabled the private fields for you to share the credentials securely. For the package, you can either use the ticket controls or share it through a file-sharing service such as Dropbox, Google Drive, etc.
The goal is to debug this issue in a non-production environment where I can perform actions like disabling plugins and switching themes without impacting the live site.
Thank you for your patience. I wanted to update you on the current status of the investigation.
The staging site is extremely slow on my end, with each action taking several minutes to respond. Additionally, there are frequent database errors and 504 timeout errors, indicating resource limitations. When plugins are disabled, the performance improves, but the original error stops occurring, making it difficult to troubleshoot effectively in the current state.
To aid in debugging, I attempted once more to create a package of the site to test locally, but this isn't working. If possible, could you temporarily enable SSH access for the application user by following this guide: hidden link? Also, please confirm that the SFTP credentials provided are correct, as I am currently seeing an incorrect username/password error.
With SSH access, I will be able to create an SQL dump and copy the site files manually for local debugging. Additionally, I enabled debug mode on the site, but it isn't generating any errors. If you could contact your hosting provider to obtain the error logs from today (November 8th) or any other day when the issue occurred, that would be very helpful. You can upload the logs directly to the server or use a file/text-sharing service like Pastebin to share them with us.