Skip Navigation

[Resolved] White pages with Toolset views

This thread is resolved. Here is a description of the problem and solution.

Problem: I am having memory errors and missing content on my site when I try to display a custom search View with a map and markers.

Solution:
When so many filters and posts are possible in the search, it becomes less practical to use the "Only show available inputs" option for the custom search View.

This support ticket is created 6 years 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.

Sun Mon Tue Wed Thu Fri Sat
8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 - -
13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 - -

Supporter timezone: America/New_York (GMT-04:00)

This topic contains 13 replies, has 2 voices.

Last updated by TobiasS8611 6 years ago.

Assisted by: Christian Cox.

Author
Posts
#1153978

Hello together,

I have a lot of white pages with pages where i use toolset views. All other pages are ok. Its a divi template.

I had about 1.000 custom posts and everything was fine. Now I imported another 13.000 custom posts and now everything with toolset views is hanging. There is no maps view or custom search possible.

White pages are f.e.: hidden link (full map) or hidden link (full search)

What can I do? How can i localize the problem?
I´m using PHP 7.2

#1154051
Screen Shot 2018-11-27 at 1.58.42 PM.png

Hi, it looks like the HTML content of this page is incomplete. See the attached screenshot. This typically indicates a lack of memory. My first suggestion is to turn on server logs temporarily to see if any errors are logged. If you are not familiar with server logs, I can help. Go in your wp-config.php file and look for

define('WP_DEBUG', false);

Change it to:

define('WP_DEBUG', true);

Then add these lines, just before it says 'stop editing here':

ini_set('log_errors',TRUE);
ini_set('error_reporting', E_ALL);
ini_set('error_log', dirname(__FILE__) . '/error_log.txt');

Now reload one of the white pages. If any server-side errors are generated, you will find an error_log.txt file in your site's root directory. Then you can revert the changes you made to wp-config.php. If a memory problem is revealed in the logs, you can follow the documentation here to try to increase your available memory: https://codex.wordpress.org/Editing_wp-config.php#Increasing_memory_allocated_to_PHP

If there is a different problem, please copy + paste the log messages here for me to review.

#1154449

Thanks for your help Christian. Now it shows me an error:

Fatal error: Out of memory (allocated 225447936) (tried to allocate 4096 bytes) in /mnt/web315/a0/84/51873384/htdocs/WordPress_02/wp-includes/wp-db.php on line 1889

I put this lines to wp.config.php:

 // increase PHP Memory  
define( 'WP_MEMORY_LIMIT', '96M' );
define( 'WP_MAX_MEMORY_LIMIT', '256M' ); 

But there is no difference. The error message is still there. And there is no error_log.txt in my root directory.

#1154502

I tried to integrate a new map to wma.tobias-schmidt.me/italien/toskana
After saving the site it shows me the following faults:

 Warning: Use of undefined constant minor - assumed 'minor' (this will throw an Error in a future version of PHP) in /mnt/web315/a0/84/51873384/htdocs/WordPress_02/wp-config.php on line 112 Warning: Cannot modify header information - headers already sent by (output started at /mnt/web315/a0/84/51873384/htdocs/WordPress_02/wp-config.php:112) in /mnt/web315/a0/84/51873384/htdocs/WordPress_02/wp-admin/includes/misc.php on line 1126 Warning: Cannot modify header information - headers already sent by (output started at /mnt/web315/a0/84/51873384/htdocs/WordPress_02/wp-config.php:112) in /mnt/web315/a0/84/51873384/htdocs/WordPress_02/wp-content/themes/Divi/includes/builder/functions.php on line 2627 Warning: Cannot modify header information - headers already sent by (output started at /mnt/web315/a0/84/51873384/htdocs/WordPress_02/wp-config.php:112) in /mnt/web315/a0/84/51873384/htdocs/WordPress_02/wp-content/themes/Divi/includes/builder/functions.php on line 2629 Notice: A non well formed numeric value encountered in /mnt/web315/a0/84/51873384/htdocs/WordPress_02/wp-content/plugins/wp-views/embedded/inc/wpv-query-debug.class.php on line 382 Notice: A non well formed numeric value encountered in /mnt/web315/a0/84/51873384/htdocs/WordPress_02/wp-content/plugins/wp-views/embedded/inc/wpv-query-debug.class.php on line 382 Warning: Cannot modify header information - headers already sent by (output started at /mnt/web315/a0/84/51873384/htdocs/WordPress_02/wp-config.php:112) in /mnt/web315/a0/84/51873384/htdocs/WordPress_02/wp-content/themes/Divi/includes/builder/functions.php on line 2627 Warning: Cannot modify header information - headers already sent by (output started at /mnt/web315/a0/84/51873384/htdocs/WordPress_02/wp-config.php:112) in /mnt/web315/a0/84/51873384/htdocs/WordPress_02/wp-content/themes/Divi/includes/builder/functions.php on line 2629 Warning: Cannot modify header information - headers already sent by (output started at /mnt/web315/a0/84/51873384/htdocs/WordPress_02/wp-config.php:112) in /mnt/web315/a0/84/51873384/htdocs/WordPress_02/wp-admin/post.php on line 198 Warning: Cannot modify header information - headers already sent by (output started at /mnt/web315/a0/84/51873384/htdocs/WordPress_02/wp-config.php:112) in /mnt/web315/a0/84/51873384/htdocs/WordPress_02/wp-includes/pluggable.php on line 1219 
#1154543

now i get a fatal error:

 [28-Nov-2018 09:20:25 UTC] PHP Fatal error:  Out of memory (allocated 227545088) (tried to allocate 4096 bytes) in /mnt/web315/a0/84/51873384/htdocs/WordPress_02/wp-includes/wp-db.php on line 1889 

i updated wp-config.php to

 define('WP_MEMORY_LIMIT', '512M'); 

but no change.
What can I try next? I deactivated almost all plugins. Only Divi Builder, Toolset Maps, Views, Module Manager and Toolset Types are activated.

here is also the php.info: hidden link

#1154812

If you're seeing fatal memory errors with these lines in your wp-config.php file:

define('WP_MEMORY_LIMIT', '512M');
define('WP_MAX_MEMORY_LIMIT', '512M');

This could indicate a problem where your host limits the amount of memory allocated to PHP in a way that must be controlled at the server level. One way to test this is for you to create a database dump file, then I can try to install a local copy of the site on my own WordPress environment. If I run into the same memory problems, then I can try to do a deeper analysis. If that's okay with you, please provide a database dump file download link in the private reply fields here.

#1155595

Please edit the Maps-Suche View and scroll to "Custom Search Settings". Select "Let me choose individual settings manually" then "Always show all values for inputs" and test again. I think the problem here is in determining all the possible combinations of filter options. When many posts are present in the database, this operation causes the query to fail.

Please let me know if the View content begins to display after changing this option in your View.

#1155631
settings view.jpg

Hello Christian, thanks for your help.
When the limit is to 100 it shows me the map. After removing the limit the map is gone again...

 {!{wpv-view name='maps-suche' view_display='layout' limit='100'}!} 

The View "Ferienhaus-Suche" is also not working. Its a normal search withoout map. Like the real estate template. It is here hidden link

#1155638

should i give you backend access to see my views?

#1155711

When the limit is to 100 it shows me the map. After removing the limit the map is gone again...
Go to Toolset > Settings > Frontend content and turn off debug, I think it's choking the page.

The View "Ferienhaus-Suche" is also not working. Its a normal search withoout map.
It's the same issue as before, there are simply so many Ferienhaus posts this View cannot support the option "Show only available options for each input".

should i give you backend access to see my views?
If you would like to give me backend access that would be fine. Private fields are active here.

#1157218

I need minimum one custom search for all objects. Actually it is on this site: hidden link;
I updated this View and the pagination options. It seems to be performing better now, can you check?
hidden link

#1157699

Hey Christian,
this is really cool! Thanks a lot for your help. It is very fast.
Is it possible that the Region is changing when I select the country? Or will it need to much performance?

Thanks,
Tobias

#1158071

Unfortunately the only way to link these inputs is to use the "Show only available options" feature, and this is causing performance problems. It is not possible to use this feature for only certain inputs - they must all use this feature.

#1158654

Thanks for your help Christian, you did a great job!
Unfortunatly too many houses will crash the search or I can not use all options. But nevertheless, it is ok for me and we found a good way to use the search in a nice way. Thanks a lot!