Skip Navigation

[Resolved] Upgrading website to PHP 8.1 breaks links that use rewrite for links

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
- 7:00 – 14:00 7:00 – 14:00 7:00 – 14:00 7:00 – 14:00 7:00 – 14:00 -
- 15:00 – 16:00 15:00 – 16:00 15:00 – 16:00 15:00 – 16:00 15:00 – 16:00 -

Supporter timezone: Europe/London (GMT+00:00)

This topic contains 7 replies, has 2 voices.

Last updated by Nigel 1 year ago.

Assisted by: Nigel.

Author
Posts
#2679666

I am trying to:
Update my website to PHP 8.1, as security support is ending with my hosting for PHP 8.0 and older versions. They will automatically update sites to PHP 8.1 on February 29.
When updating to PHP 8.1, links that use rewrite in custom post types do not work. Does not work from frontend or backend - clicking "view" under competitions post type (for example) in dashboard, will not take me to the page. The link displays "this page does not exist" even though the link from backend WordPress dashboard is this link.

Link to a page where the issue can be seen:
Link is for the staging website - hidden link
Use server protection details to access staging site.

I expected to see:
Links to function.

Instead, I got:
Links do not function, breaking website.

#2679785

Nigel
Supporter

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

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

Hi Sian

I was trying to access your site to take a look at your post type settings and the rewrite rules, but I can't access the back end.

You have reCaptcha protection on the log in page, but it seems it isn't valid for this staging server url, so the login form can't be used.

#2679825

I have turned off recaptcha on staging site for the login page. Please let me know if this works.

#2679864

Nigel
Supporter

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

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

Sorry, but the login page still has the reCaptcha, preventing logging in.

#2679869

I got rid of the captcha key. Please try again and let me know.

#2679870

I am also troubleshooting sitemap using my SmartCrawl plugin.

#2679871

Ok I think troubleshooting actually fixed it! Unless you guys did something behind the scenes so please let me know whether you did anything before I close the thread.

#2679873

Nigel
Supporter

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

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

Didn't do anything except try to log in!

#2679874

Haha sorry! Thank you for your help - sorry for wasting your time