Skip Navigation

[Resolved] Intermittent Custom Post Archive 404s – Custom Post Slow update & more

This support ticket is created 6 years, 7 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 10 replies, has 3 voices.

Last updated by emilyB-2 6 years, 6 months ago.

Assisted by: Minesh.

Author
Posts
#913069

Hi,

I am been struggling with my site for quite a while with some erratic behaviours and I'd like help to suggest a troubleshooting approach to pin point the issue.

I have a problem with the translated version of a custom post archive named "psychologists".

The symptoms are that every time I perform some kind of administrative task, such as updating a plugin or updating the content of a post, the french version of the archive of the post type "psychologists" returns a "Page not found 404" for a length of about a minute.

I also noticed that updating a single custom post type "psychologists" takes about a minute. However, the website is hosted on a very fast dedicated server which is currently under-utilized. I've tried allowing more memory and runtime to PHP as a blind test without success.

I do not have this kind of problem with other custom post types. However, psychologists post types rely heavily on post type relationship. There could be several dozens of post relationships per psychologist post.

My knowledge of the inner mechanisms of WordPress is very limited, but I've read that rewrite rules generation is usually involved. I also know this mecanism is very different for NGINX than Apache.

Recently, custom post of type "psychologists" also stopped saving the state of some post fields, which is also quite worry some.

I'm using Toolset Types & Views, WPML, Beaver Builder.

Again, what I would like is to be provided with a procedure to follow in order to collect debugging information that would allow to pin point the issue. I already know the universal answer "revert to twenty eighteen, disable all plugins, etc". I want something a bit more programmatic such as being able to visualize queries that would take longer than usual, inserting breakpoints, etc. All the plugins I am using are well coded & supported, commercial solutions. There should not be any rotten apples in there (Toolset, WPML, Yoast SEO, Beaver Builder, Gravity Forms, Relevanssi, Akismet). I'm on a pure NGINX installation (no apache) deployed by RunCloud.io and running PHP-FPM-cache + the NGINX Helper Plugin.

Thank you

#913326

Minesh
Supporter

Languages: English (English )

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

Hello. Thank you for contacting the Toolset support.

1)
Well - as you requested here is the official Doc that will help you to debug the issue with much more control.
=> https://toolset.com/documentation/programmer-reference/debugging-sites-built-with-toolset/

To enable PHP debugging in WordPress, edit your wp-config.php file and add the following:

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

This produces a file error_log.txt in your WordPress root directory. Make sure that the web server can create and write this file. If it cannot, use an FTP program to create the file and make it writable to Apache (normally, the www-data user).

After this is enabled, all errors that occur when using your website’s front-end and backend, are logged into that error_log.txt file.

Please send me what you find with your error log so I can guide you in right direction.

2)
Recently, custom post of type "psychologists" also stopped saving the state of some post fields, which is also quite worry some.
==> Well - do you mean checkboxes field does not save the state with related post is saved? If yes: this is known to us and this issue is reported to our Devs.

3)
If its possible send me temporary access so I can confirm the #2 issue.

*** Please make a FULL BACKUP of your database and website.***
I would also eventually need to request temporary access (WP-Admin and FTP) to your site. Preferably to a test site where the problem has been replicated if possible in order to be of better help and check if some configurations might need to be changed.

I would additionally need your permission to de- and re-activate Plugins and the Theme, and to change configurations on the site. This is also a reason the backup is really important. If you agree to this, please use the form fields I have enabled below to provide temporary access details (wp-admin and FTP).

I have set the next reply to private which means only you and I have access to it.

#915001

Hi,

Thanks for your answer. I was able to continue the troubleshooting and I found very interesting details.

1 - Customs posts of type "psychologists" that are newly created save the checkbox values properly.
2 - When I remove all the post relationships from a post that was previously not saving check-boxes values, it becomes possible to save the check-boxes values again.
3 - Without post-relationships established with a post of type "psychologist", saving the post becomes very fast. All the post relationships established with the "psychologists" post type are of type "many-to-many".
4 - I did run a slow query log on MariaDB backend as well as with the "Query Monitor" plugin and did not detect any queries that ran for too long.
5 - When updating posts with several relationships established, PHP processes of the user associated with the website uses a lot of CPU power while the post is being saved (more than a minute).
6 - I did not migrate to the new relationships database on my production site.
7 - PHP & WordPress debug did not report any problems.
8 - I did migrate my test site to the new relationships model and check-boxes statuses save just as before
9- Since the built-in migration script keeps the intermediate posts in the case of many-to-many relationships, I find the result quite messy and hard to maintain.

You mentioned there is a known issue about check-boxes states not saving. Is what I am describing above part of that issue?

As a side note, I must admit that I am a bit worried about Toolset's capability to support two post-relationships models in parallel and my worry is that sites that did not migrate to the new schema will end up last in line when it comes to support... Would it be possible for you guys to provide me with a script to migrate properly and completely to the new relationships schema, especially the many-to-many relationships?

As for the archive page not being regenerated quickly after updating one of it's post, I have some more investigation to do and I and will report back.

As a summary, here are the question I'd like a follow-up with :
- Does the current open issue/bug addresses directly my problem as described above? If so, when will it get released
- Can you provide a more intelligent migration script to the new post relationship model, that would migrate many-to-many relationships cleanly?

Thank you,

François

#915836

Minesh
Supporter

Languages: English (English )

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

1 - Customs posts of type "psychologists" that are newly created save the checkbox values properly.
2 - When I remove all the post relationships from a post that was previously not saving check-boxes values, it becomes possible to save the check-boxes values again.
3 - Without post-relationships established with a post of type "psychologist", saving the post becomes very fast. All the post relationships established with the "psychologists" post type are of type "many-to-many".
===> Checkboxes issues are known to us and we already reported to our Devs and it will be fixed with next release of Types.

4 - I did run a slow query log on MariaDB backend as well as with the "Query Monitor" plugin and did not detect any queries that ran for too long.
5 - When updating posts with several relationships established, PHP processes of the user associated with the website uses a lot of CPU power while the post is being saved (more than a minute).
===> We already published new version for views. Please update it to latest release.

6 - I did not migrate to the new relationships database on my production site.
7 - PHP & WordPress debug did not report any problems.
==> OK.

8 - I did migrate my test site to the new relationships model and check-boxes statuses save just as before
9- Since the built-in migration script keeps the intermediate posts in the case of many-to-many relationships, I find the result quite messy and hard to maintain.
==> OK

You mentioned there is a known issue about check-boxes states not saving. Is what I am describing above part of that issue?
==> Yes - more or less its related. Lets wait for the Types 3.1 release.

As a side note, I must admit that I am a bit worried about Toolset's capability to support two post-relationships models in parallel and my worry is that sites that did not migrate to the new schema will end up last in line when it comes to support... Would it be possible for you guys to provide me with a script to migrate properly and completely to the new relationships schema, especially the many-to-many relationships?
==> There is no such script available. You have only one choice, either use legacy relationship or migrate to new relationship. You can not use both relationship at a time. The migration process is automation process which is managed by Types 3.X.X plugin exclusively.

As for the archive page not being regenerated quickly after updating one of it's post, I have some more investigation to do and I and will report back.

As a summary, here are the question I'd like a follow-up with :
- Does the current open issue/bug addresses directly my problem as described above? If so, when will it get released
==> Yes - its related but I do not have any ETA when the next release is possible. You can expect it within a month or so from now on or maybe sooner than that.

- Can you provide a more intelligent migration script to the new post relationship model, that would migrate many-to-many relationships cleanly?
==> Sorry, No migration script available as I explain in this reply before. The migration process is automation process which is managed by Types 3.X.X plugin exclusively.

#916034

Hello,

I must admit that I am a bit disappointed. I believe you guys should advise customers that are not ready to move to the new relationships against upgrading to the new types plugin as some standard functionalities will not work properly in that "legacy mode".

Also, although you are saying that the development team is aware of the problem, you haven't confirmed that my issue is exactly what will end up being fixed in the next release, calling it "more or less related", and leaving me without any guarantee that this will be worth the wait.

In this context, and since my site has evolved quite a bit since I did the upgrade effectively voiding the option of a rollback, I will have no choice but to move to the new relationships schema and loose the convenience of the legacy many-to-many relationships.

The way this support ticket unrolled also seems to hint towards the fact that the legacy mode is already a second class citizen in Toolset Types. This is fine, as long as you guys are upfront with that. Calling it "best-effort support" or "deprecated" with the mention "experimental" as long as 3.1 isn't released in a month from now would be worth considering.

No hard feelings, but I just thought it was important to share this feedback.

François

#916061

Actually, I'd like to have a second opinion from one of your colleagues please.

Thanks,

François

#916190

Hi Emily,

I'm Mohammed, the Toolset support team leader.

I'm not going to post a reply about the issues being mentioned here in the ticket because Minesh can handle them.
Let me explain what we can do here.

We are working intensively on the new post relationships. it's the highest priority in Toolset in the meantime.
Every related issue to the new post relationships is being taken very seriously and quickly to have the very stable release as soon as possible.

I see that you made everything clear in your previous replies. the fact now is that we don't have any custom scripts.
As you know, we have the migration wizard that states clearly that you need to backup your database before doing the migration.

For now, we can do one of two things.
In case you have a backup, and we already know your issues, you can provide us this website or database backup and we will try to replicate the issue and once we replicate the issue, we will move as fast as possible towards a solution.

In case you don't have a backup, we will need a copy of your database/website if available and an example situation that describes your issue and what is the correct behavior. this will take a lot of efforts from us but at the end, our happiness is to fix your issues and make you happy with Toolset.

I will let you collaborate with Minesh who is a top supporter and will follow the ticket to make sure that you get satisfied with Toolset support service and Toolset products.

Thanks.

#916193

Minesh
Supporter

Languages: English (English )

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

I believe you guys should advise customers that are not ready to move to the new relationships against upgrading to the new types plugin as some standard functionalities will not work properly in that "legacy mode".
==> Ok - could you please inform us by creating a new ticket with your each new question/issue you may have after you upgraded to new relationship and which "legacy mode" is not working with you. We are more than happy to clarify you the situation or share solution if exists.

Also, although you are saying that the development team is aware of the problem, you haven't confirmed that my issue is exactly what will end up being fixed in the next release, calling it "more or less related", and leaving me without any guarantee that this will be worth the wait.
==> Yes - the checkboxes issue is confirmed and our Devs are working on it. They have also plans to offer hotfixes if possible before the release as well. I will get in touch with you as soon as I know more. Our Devs said you need to wait for couple of weeks from now.

In this context, and since my site has evolved quite a bit since I did the upgrade effectively voiding the option of a rollback, I will have no choice but to move to the new relationships schema and loose the convenience of the legacy many-to-many relationships.
=> Well - you need to either chose one way, use legacy relationship or migrate to new one. If you already migrated, unfortunately there is no way to rollback it. If you have backup with you, you may try to use your backup to restore your legacy relationship.

We appreciate your feedback but our Devs are really working hard to stabilize everything and each issue is important to us and they are ready to fix it, if confirmed.

#916228

Hi,

In response to Mohammed's answer : Thank you for your answer. I'll be happy to participate in helping resolve outstanding issues. So yes, I do have backups taken every day that I can provide easily. They are not duplicator packages but simply a tar.gz + a zip of the database sql. Please open private reply so I can provide a link + credentials.

In response to Minesh's answer : The feature that is not working in legacy mode is saving check-boxes statuses when many-to-many post-relationships are present on a custom post. This functionality was working properly before the upgrade. I have also confirmed that by removing all relationships established with the custom post, the check-boxes statuses start saving properly. Please note that I have observed very high CPU usage and delays when trying to save custom post are have several many-to-many post relationships and I wondering if this could be related.

Thank you

François

#916241

Minesh
Supporter

Languages: English (English )

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

1)
In response to Minesh's answer : The feature that is not working in legacy mode is saving check-boxes statuses when many-to-many post-relationships are present on a custom post. This functionality was working properly before the upgrade. I have also confirmed that by removing all relationships established with the custom post, the check-boxes statuses start saving properly.
==> Yes - I confirm that the checkboxes issue is known and as I already replied it will be fixed with next release.

2)
Additionally, To let you know that we also published a new view's version - please update ALL your Toolset plugins to it's latest official release version and check all your other issues.

*** Please make a FULL BACKUP of your database and website.***
Could you please update ALL Toolset plugins to it's latest official released version. You can download latest plugin release from your accounts page:
=> https://toolset.com/account/downloads/

3)
Once you update plugins to latest release version, please check your outstanding issues and report to us, we are happy to help you further.

In response to Mohammed's answer : Thank you for your answer. I'll be happy to participate in helping resolve outstanding issues. So yes, I do have backups taken every day that I can provide easily. They are not duplicator packages but simply a tar.gz + a zip of the database sql. Please open private reply so I can provide a link + credentials.
==> Please create a new ticket with your each issue and share all required details, even you can share access details while you post your first post with new ticket so support person can look at it.
==> Please try to create new ticket for your each outstanding issue as per our support process, as it will be easy to handle each issue with separate ticket. We are glad to help you further.

Does this makes sense?

#924197

Hi,

Just a quick update.

I decided to stop trying to make the old relationships work and migrated the whole site to the new ones.

The post relationships now work properly.

François