Skip Navigation

[Resolved] Types is causing a fatal error in Page Attributes

This support ticket is created 4 years, 11 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.

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

Supporter timezone: Asia/Kolkata (GMT+05:30)

This topic contains 15 replies, has 4 voices.

Last updated by StanleyT8485 4 years, 10 months ago.

Assisted by: Minesh.

Author
Posts
#1511071

I am trying to: Types is causing a fatal error in Page Attributes.

Fatal error: Allowed memory size of 268435456 bytes exhausted (tried to allocate 28672 bytes) in /home/owlguru/public_html/wp-includes/wp-db.php on line 1995
There has been a critical error on your website. Please check your site admin email inbox for instructions.

Screenshot: hidden link

This is for a custom post type I created with Types.

The other default WordPress post types like Pages are ok.

Note: To access the wp-admin, you might need to give me your IP address to whitelist.

#1511803

Hello, is the same error occurring with only Types and a default theme like Twenty Twenty active? If not, please activate your theme and other plugins one by one until the error returns. I am out tomorrow so another supporter is likely to take this ticket, and their IP will be different than mine.

#1512677

Hi,
Yes, I did the troubleshoot and when I enabled Types, the issue came up.

#1513459

Shane
Supporter

Languages: English (English )

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

Hi Stanley,

Christian is currently unavailable today. However could you try this solution below.
hidden link

Once you have done this please post the results as Christian should be here tomorrow to continue this thread with you.

Thanks,
Shane

#1513639

Hi Shane,
My web host tried increasing the memory size and that didn't work.

Here is what they said:
"I tried increasing the memory limit in wp-config to 1024MB but it didn't work.

It's not recommended to increase the PHP memory limit that high, the server only has 4 Gigs of RAM total.

No PHP script should ever need a Gig of RAM.

I have increased the PHP memory limit to 256MB which is really a little too high, but check and let us know if you're still getting the error.

We may want to reduce that back down as much as possible to prevent the server from OOM (out of memory) errors.

Is there a way we can reliably reproduce the error for further testing to see if we can lower that?"

#1515405
#1515465

Hi Christian,

Your IP has been whitelisted.

#1516603

Sorry I'm still getting the 403 forbidden error and my IP has not changed since yesterday. Would it be possible for you to create a site clone using the Duplicator plugin? That might be faster than working out an IP issue. Please exclude the uploads folder from the clone to save space. Then you can post the duplicate on Drive or Dropbox and provide a download link for me here.

#1517327

Sorry, my host didn't properly whitelisted your IP. Now it is. Give it another try.

#1519041

Still 403 forbidden. I'll be glad to transfer this to another supporter if necessary, it seems like whitelisting my IP is not working.

#1519773

Would you be able to transfer this to Minesh? He managed to get into the site in my previous ticket.

Thanks for your help, Christian!

Stan

#1524715

Hi,
Just following up on this ticket.

Thanks.

Stan

#1527193

Yes sure, I will gladly transfer to Minesh. Sorry for the hassle, I'm not sure why my IP isn't working with your whitelist.

#1528269

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Hi Stanley - As you requested this ticket is passed to me.

I checked with my local test install where only Toolset Types and Views plugins are active and setup a New post type using Types plugin and with that post type, I've enable the settings Page Attributes and hierarchical so that the Page Attributes section should be displayed with the post type.

I can see the Page Attributes section is successfully displayed without any issue.
=> hidden link

It looks like the issue is - I see with the "career" post type you have more than 5000 posts available.
=> hidden link

And with the "Page Attributes" section it tries to query and load all those 5000 posts within the parent dropdown available under this "Page Attributes" section where the query fails as to load 5000 posts is not a good way.

I suggest you should try to create a new post type and add few posts to that post type and then check with that post type after enabling the settings Page Attributes and hierarchical for that post type - do you see the "Page Attributes" section as expected?

#1532025

Hey Minesh,
You're right. I created another CPT and the page attributes load just fine.

How can I load all those 5000 posts under page attributes? I need all those posts in that CPT for site structure reasons.

Stan