Skip Navigation

[Resolved] Imported CPT from other site results in 404

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
- 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9: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/Karachi (GMT+05:00)

This topic contains 12 replies, has 3 voices.

Last updated by Waqar 1 year, 8 months ago.

Assisted by: Waqar.

Author
Posts
#2599157

I have exported a CPT "Verhalen" from an existing site and imported into a new site. The import went well. After that I imported the actual posts via the WP Importer feature. The also went well. However, every Post results in a 404.
You can check it out here hidden link

#2599237

Nigel
Supporter

Languages: English (English ) Spanish (Español )

Timezone: Europe/London (GMT+00:00)

You can edit the imported posts in the back end?

I suggest you try re-saving your permalinks before going any further.

#2599259

Yes, I can edit the imported posts in the back end.
I have added a new test post, I can view the Preview, but the published version is the same 404 issue.
I have already re-saved my permalinks, did not help.

#2599425

I found a (the?) solution. I have disabled Hierarchical for the CPT on the new site (even though it was enabled on the original site). Now the post is shown. How is it possible that the same settings don't work on both sites? What is so different about Hierarchical that it can break this?

#2600039

Hi,

Thank you for sharing this update. It is strange that it is affected by the 'Hierarchical' option.

Are the 'Permalink' settings the same on both websites? Can you please share the temporary admin login details, of the website where the issue is reproducible?

Note: Your next reply will be private and making a complete backup copy is recommended before sharing the access details.

regards,
Waqar

#2600729

Thank you for sharing the access details.

While I can see the issue on your website, I couldn't reproduce this on a clean test website. This suggests that something specific to this website is involved.

Is the other website also hosted on the same 'Cloudways' server? And do I have your permission to download a clone/snapshot of the website, to test this on a different server?

#2603203

Hi, sorry for the delay in response.
Live and staging sites are both at Cloudways, but at different servers.
It's ok to download a copy of the website.

#2604005

Thank you for the permission.

The admin login link that you shared earlier, seems to have expired. Can you please share a new link or the temporary admin username and password?

I'm setting your next reply, as private again.

#2604691

Thank you for extending the admin access.

I've downloaded the website's clone and will be performing some tests. Will share the findings, as soon as this testing completes.

#2606835

Thank you for waiting as I worked on your website's clone.

During troubleshooting, I noticed that the option 'query_var' was also unchecked for the post type 'Verhalen'. This is what was causing it to not work when the 'hierarchical' option was enabled.

You can check the option 'query_var' on the live website too and it should be fixed.

I hope this helps and let me know how it goes.

#2608861

I am not following, on the live site Hierarchical is checked and query_var is unchecked and the Posts show up fine, so "You can check the option 'query_var' on the live website too and it should be fixed." is confusing as the live site is just fine. Even when I check both boxes on the live site, the Posts still show up.

However, on the staging with Hierarchical checked and query_var unchecked, the Posts show as 404. I have to check none or both checkboxes to make the Posts work.

#2609205

I'm afraid, your observation from the live website contradicts the results from my test website (and also what we see on the staging website).

Can you please share the temporary admin login details of the live website, to see if we can narrow down the difference?

Note: Your next reply will be private and though no irreversible changes will be made to the live website, making a complete backup copy is recommended before sharing the access details.

#2611269

Thank you for sharing the access details.

I've checked and in the 'Verhalen' post type's settings, the 'query_var' option is indeed checked.
( screenshot: hidden link )

As it is a live website, I haven't made any changes to it for any testing. But, I'm confident that if you'll disable 'query_var' option for this post type, you'll start to see the same issue with the 'Hierarchical' option, on the live website too.