Skip Navigation

[Resolved] CPT edit.php?post_type=android shows blank screen

The Toolset Community Forum is closed, for technical support questions, please head on to our Toolset Professional Support (for paid clients), with any pre-sale or admin question please contact us here.
This support ticket is created 9 years, 1 month ago. There's a good chance that you are reading advice that it now obsolete.
This is the community support forum for Types plugin, which is part of Toolset. Toolset is a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients and people who registered for Types community support can post in it.

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

Supporter timezone: Asia/Manila (GMT+08:00)

Tagged: 

This topic contains 14 replies, has 2 voices.

Last updated by robG-4 9 years ago.

Assisted by: emerson.

Author
Posts
#292214

I am trying to: access "view all" from the CPT "Android", that I created (I can view categories, tags, and "add new" work fine)

I visited this URL: hidden link

I expected to see: The list of Custom Posts I created - 3,243 of them (note: if I click under categories, and then click on an individual "count" under a specific category - it works fine).

Instead, I got: A blank, white, screen.

The CPT's show fine from the front end - hidden link

Please know that I've tried this on my in-house server, running WAMP, with 512mb of memory limit and I get the same error.
I've tried:

Multiple themes - including WP 2011 and 2015

Increasing the memory up to 512mb and placed the "define memory" in the wp-config, near the top of the file.

Deactivating - and then removing - all plugins except for Types.

Enabled WP-Debug and get no error information when the blank screen appears.

Tried disabling the cache translations.

#292244

Dear Rob,
I see that your Android post type might have a lot of posts to load (3243) and this could be an issue with meta post caching. Can you try adding this code to your active theme functions.php and see if it resolves the issue?

function wp_custom_update_meta_cache_filter() {
    global $pagenow, $typenow;
    if ( $pagenow == 'edit.php' && $typenow == 'android' ) {
        add_action( 'parse_query', 'wp_custom_update_meta_cache_off' );
    }
}
add_action( 'admin_init', 'wp_custom_update_meta_cache_filter' );
 
function wp_custom_update_meta_cache_off() {
    set_query_var( 'cache_results', false );
    return;
}

Make sure though that you have backup everything before adding that. Then after the code, clear your browser cache and login again to check if it still blank or not. Please let me know how it goes. Thanks 🙂

Cheers,
Emerson

#292992

Sorry for the delay Emerson - my host didn't provide enough memory - only 256mb.

I updated the functions file with the code you provided - but I still had to increase my memory to 1 GB - in order to display those 3800 records.

I'm not sure I can afford enough memory to run Types, AND Views, with 60,000 records…which is too bad because it looks like Views is just what I need!

Thanks for your help!
Rob

#293572

Dear Rob,
Looks like your site is going to get big and with lots of data. In your case, the following are some recommendations which can minimize or resolved the memory issue when dealing with a lots of records to process and display:

a.) Consider deactivating plugins which are not much needed in your site. Plugins consume memory and ensure that you are only using those plugins you needed most.

b.) Delete any plugins which are not activated or needed in your wp-content/plugins directory. WordPress is still need to parse them and that requires some memory in the backend.

c.) Consider using a caching plugin like W3TC: https://wordpress.org/plugins/w3-total-cache/ to put items in the cache. This saves memory because without these items being cached, PHP will always be rendering and processing them (requires memory).

d.) Consider using a dedicated hosting solution. This is one of the big improvements you can make to your site if being limited with memory or other things. With dedicated hosting solution, you have entire control to your memory and resources as compared to being shared with other sites (such as in shared hosting solution).

In our end, we are on the process of improving the Toolset plugins memory utilization and that is on our roadmap.

We also released the latest version of Types: https://toolset.com/home/types-manage-post-types-taxonomy-and-custom-fields/
Can you do a backup first and then upgrade Types to version 1.6.6.1 and then re-checked?

if the above recommendations does not need help, I enabled your next reply as private so we can checked this issue directly inside your site. Please add your WordPress login in that secure form. Thanks 🙂

Cheers,
Emerson

#294732

By the way Emerson, at this point I'd rather not have any caching turned on…feel free to test with that W3C plugin, and leave it running if you like, but generally I don't use caching - it becomes an issue when I'm working on the sites - which is most all the time.

#294781

Dear Rob,
Allow me to look at this more closely. We are creating a clone of your site so we can test it on our own test server. This is to check if this is an issue with our plugins or something related to your server. We will feedback you either today or tomorrow. Thanks 🙂

Cheers,
Emerson

#294785

Hello Emerson,
No problem - I appreciate your help!

You should know that the server I sent you is the 3rd server I've tried this on. It is an Ubuntu 14.04LTS that I configured myself. The other was a Windows Server running WAMP that I mentioned in the first email - and I also installed IIS on that server, put the website in that, and had the same issue. The third instance is on my hosting provider - 1and1…a very low-resource setup withh only 61mb of ram…you can check out that configuration here - hidden link

And a quick question - I'm just curious but did you make any changes that could have created a problem with the images loading in the /android/free categories? I only ask because if you got to the Android Paid, or any of the Apple categories, they all work…only the Android/free images are broken.

Thanks!
Rob

#294787

Dear Rob,
Nope, the only change I made to your site is on the plugins page. I added the duplicator plugin, PHP info plugin and deactivating the Server IP & Memory Usage Display. I also deactivated the WordPress importer and All Import temporarily because they are not needed real time. Just to check if it saves memory. I then activated it again. I think these changes are not related to that problem , it looks isolated.
We are setting your test site now and I will let you know our findings soon 🙂 Thanks for the info.

Cheers,
Emerson

#294801
android_list_page.jpg

Dear Rob,
In my local setup, I'm not been able to replicate this using the exact version of your files and database. (see screenshot). I have 128MB memory limit set by PHP and this is what I'm using by default (in my PHP installation).
But, I can replicate this error (white screen) when I commented this line in your theme functions.php(this is the workaround I'v suggested above):

add_action( 'parse_query', 'wp_custom_update_meta_cache_off' );

I can now see the memory related error on the debug log (PHP Fatal error: Allowed memory size of 268435456 bytes exhausted).
However, in your site , it still not working even though the lines added and not commented in your functions.php. Since I don't access to your wp-config.php through FTP. As a workaround, can you adding this line on 'top' of your wp-config.php (immediately after the PHP tag) ?

ini_set('memory_limit', '-1');

This will let WordPress utilize any available memory as possible. Then in your functions.php make sure those temporary workaround (I've suggested previously) is still there. Check if you can now see this page: edit.php?post_type=android

Note: I have forwarded this issue to the Types development team so they can review this one. They might be checking your site and downloading the duplicator package. So don't deactivate the duplicator for now while they will verify this.

Let me know how it goes. Thanks 🙂

Cheers,
Emerson

#294931

Hi Emerson,

I inserted that line into the wp-config file - like so:

<?php
ini_set('memory_limit', '-1');
/**
 * The base configurations of the WordPress.

Unfortunately it did not have any impact on the problem.

I will leave that site up just as it is until you and your team are done 😉

Thanks!
Rob

#295191

Dear Rob,
I take another second look on this and I've noticed that aside from the typical cache that is removed on the first set of code. There is another cache heavy request done by the Types plugin. This is another cause of the memory issue.

Can you try adding this line of code to your active theme functions.php (in addition to the previous code on removing post meta cache I've mentioned here: https://toolset.com/forums/topic/cpt-edit-phppost_typeandroid-shows-blank-screen/#post-292244

add_action( 'wp_loaded', 'remove_types_post_meta_cache');
function remove_types_post_meta_cache() {
	remove_filter( 'the_posts', array('WPCF_Loader', 'wpcf_cache_complete_postmeta') );
}

In my test here, this works with a very limited memory somewhere 64MB to 128MB. Then clear your browser cache and check again.

I've noticed that my WordPress login credentials are not anymore working in your site, do you change it?

If this is still not working, please restore my WordPress login credentials in your test site. And also provide FTP logins so I can check the settings in your wp-config, etc (make us faster to debug). I have set again your next reply as private just in case you are having issue inputting these details.

If this works, I'll let the Types team know about this so this can be reviewed in the next versions.

Please let me know how it goes. Thanks 🙂

Cheers,
Emerson

#295198

Dear Rob,
Thanks for updating my login. Yes I've noticed you also have 'apple' apps post type is that loading a lot of posts. This is causes white screen on the backend (confirmed). The temporary fix is that I added 'apple' post type too in the original code that is meant to work for 'androids'

function wp_custom_update_meta_cache_filter() {

    global $pagenow, $typenow;

    $post_types_for_exclusion = array('android', 'apple');
    
    if ( $pagenow == 'edit.php' && (in_array($typenow,$post_types_for_exclusion)) ) {

        add_action( 'parse_query', 'wp_custom_update_meta_cache_off' );

    }

}

add_action( 'admin_init', 'wp_custom_update_meta_cache_filter' );

I already updated this to your functions.php. I can see that the Apple Apps list page is loaded now. I also sent the sent the server configuration I used to test your site locally to your verizon.net email. I'm using Apache 2 + in Fast CGI, Linux server + PHP Version 5.5.9-1ubuntu4.7. The memory configured is 128MB.

This memory limitation is already forwarded to the Types team for review. For now, we can use the temporary workarounds and this should work if you need to increase the number of posts. Please let me know how it goes. Thanks 🙂

Cheers,
Emerson

#295415

Hello Emerson!

Okay - it gets even stranger 🙂

When I copy the new code, from the functions.php, to my hosted site - the Healthitlink.com - on 1and1.com - where it shows I have 120mb of memory (but I think it's only 61mb...) - everything works perfectly!

There is no delay, no white screen, everything is fast and works as it should.

But, on the site hosted on MS Azure, the Virtual Machine with 2gb of ram, it's still very slow and the Apple category still causes a white screen.

So, it must be something wrong with Azure or, more likely ;), something wrong with my configuration of that Ubuntu system.

That said, the code fix in the functions file works! After all that I just need to stay on my hosted site.

Let me know if you'd like to further test with the jlghitlink.cloudapp.net url. If you do, I will leave it up for you and your team.

Could it be a permission issue? I had some problems configuring the permissions/ownerships for the WordPress folders on that system. I'm fairly certain the database is setup correctly.

But I will leave that url/system running until I hear from you - for now I'm satisfied with the fix you gave me and will run the site from my 1and1 hosting package.

Thanks for your help!
Rob

#295535

Dear Rob,
It is not likely a permission issue but I've read a lot of memory related issues related to MS Azure:
http://stackoverflow.com/questions/24108733/memory-quota-exceeded-using-wordpress-on-shared-azure-website
Azure also has a troubleshooting guide for working with WordPress sites hosted on their own server here (including slow loading page on backend and memory issues):
hidden link
Yes, please leave the logins intact for now as the Types dev team will be reviewing this. Thanks 🙂

Cheers,
Emerson

#295536

Dear Emerson,
Thank you and I will read those posts!

I had forgot 😉

I turned the system off - but just turned it back on…so if they've tried to get in and couldn't
they should be good to login now.

Rob

The forum ‘Types Community Support’ is closed to new topics and replies.

This ticket is now closed. If you're a WPML client and need related help, please open a new support ticket.