Skip Navigation

[Assigned] Going to Settings > Permalinks results in a fatal error

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 19 replies, has 1 voice.

Last updated by Thorworx 4 hours, 49 minutes ago.

Assisted by: Minesh.

Author
Posts
#2853367
Screen Shot 2026-03-24 at 6.38.02 AM.png

I am trying to: Update permalink settings.

Link to a page where the issue can be seen: hidden link

I expected to see: The Permalink Settings page.

Instead, I got: See screenshot.

In troubleshooting this issue, disabling the Types plugin resolves the issue.
This seems to be a problem with custom post types and WordPress class-wp-rewrite.php

Here is the debug info:

Deprecated: WPV_Content_Template_Embedded::__construct(): Implicitly marking parameter $constants as nullable is deprecated, the explicit nullable type must be used instead in /home/duboisking/public_html/new/wp/wp-content/plugins/toolset-blocks/embedded/inc/classes/wpv-content-template-embedded.class.php on line 57

Deprecated: WPV_Content_Template_Embedded::__construct(): Implicitly marking parameter $wpv_wordpress_archive_frontend as nullable is deprecated, the explicit nullable type must be used instead in /home/duboisking/public_html/new/wp/wp-content/plugins/toolset-blocks/embedded/inc/classes/wpv-content-template-embedded.class.php on line 57

Deprecated: OTGS_UI_Loader::__construct(): Implicitly marking parameter $locator as nullable is deprecated, the explicit nullable type must be used instead in /home/duboisking/public_html/new/wp/wp-content/plugins/toolset-blocks/vendor/otgs/ui/src/php/OTGS_UI_Loader.php on line 22

Deprecated: OTGS_UI_Loader::__construct(): Implicitly marking parameter $assets as nullable is deprecated, the explicit nullable type must be used instead in /home/duboisking/public_html/new/wp/wp-content/plugins/toolset-blocks/vendor/otgs/ui/src/php/OTGS_UI_Loader.php on line 22

Deprecated: Toolset_Compatibility_Theme_Handler::__construct(): Implicitly marking parameter $populate_manager as nullable is deprecated, the explicit nullable type must be used instead in /home/duboisking/public_html/new/wp/wp-content/plugins/toolset-blocks/vendor/toolset/toolset-theme-settings/compatibility-modules/toolset.layouts-theme.class.php on line 48

Deprecated: Toolset_Compatibility_Theme_Handler::__construct(): Implicitly marking parameter $helper as nullable is deprecated, the explicit nullable type must be used instead in /home/duboisking/public_html/new/wp/wp-content/plugins/toolset-blocks/vendor/toolset/toolset-theme-settings/compatibility-modules/toolset.layouts-theme.class.php on line 48

Deprecated: OTGS\Toolset\Common\Relationships\MainController::__construct(): Implicitly marking parameter $database_layer_factory_di as nullable is deprecated, the explicit nullable type must be used instead in /home/duboisking/public_html/new/wp/wp-content/plugins/toolset-blocks/vendor/toolset/toolset-common/inc/m2m/MainController.php on line 85

Deprecated: OTGS\Toolset\Common\Relationships\MainController::__construct(): Implicitly marking parameter $cleanup_factory_di as nullable is deprecated, the explicit nullable type must be used instead in /home/duboisking/public_html/new/wp/wp-content/plugins/toolset-blocks/vendor/toolset/toolset-common/inc/m2m/MainController.php on line 85

Deprecated: ToolsetCommonEs\Library\MobileDetect\MobileDetect::__construct(): Implicitly marking parameter $headers as nullable is deprecated, the explicit nullable type must be used instead in /home/duboisking/public_html/new/wp/wp-content/plugins/toolset-blocks/vendor/toolset/common-es/server/Library/MobileDetect/MobileDetect.php on line 686

Deprecated: ToolsetCommonEs\Rest\Route\PostSearch::__construct(): Implicitly marking parameter $wp_query_factory as nullable is deprecated, the explicit nullable type must be used instead in /home/duboisking/public_html/new/wp/wp-content/plugins/toolset-blocks/vendor/toolset/common-es/server/Rest/Route/PostSearch.php on line 15

Deprecated: OTGS_Installer_Repository::set_subscription(): Implicitly marking parameter $subscription as nullable is deprecated, the explicit nullable type must be used instead in /home/duboisking/public_html/new/wp/wp-content/plugins/types/vendor/otgs/installer/includes/repository/class-otgs-installer-repository.php on line 85

Deprecated: OTGS_Installer_Package_Product_Finder::get_product_in_repository_by_subscription(): Implicitly marking parameter $subscription as nullable is deprecated, the explicit nullable type must be used instead in /home/duboisking/public_html/new/wp/wp-content/plugins/types/vendor/otgs/installer/includes/class-otgs-installer-package-product-finder.php on line 11

Warning: Cannot modify header information - headers already sent by (output started at /home/duboisking/public_html/new/wp/wp-content/plugins/types/vendor/otgs/installer/includes/class-otgs-installer-package-product-finder.php:11) in /home/duboisking/public_html/new/wp/wp-includes/functions.php on line 7182

Fatal error: Uncaught TypeError: Unsupported operand types: string & int in /home/duboisking/public_html/new/wp/wp-includes/class-wp-rewrite.php:1036 Stack trace: #0 /home/duboisking/public_html/new/wp/wp-includes/class-wp-rewrite.php(1413): WP_Rewrite->generate_rewrite_rules() #1 /home/duboisking/public_html/new/wp/wp-includes/class-wp-rewrite.php(1513): WP_Rewrite->rewrite_rules() #2 /home/duboisking/public_html/new/wp/wp-includes/class-wp-rewrite.php(1888): WP_Rewrite->refresh_rewrite_rules() #3 /home/duboisking/public_html/new/wp/wp-includes/rewrite.php(282): WP_Rewrite->flush_rules() #4 /home/duboisking/public_html/new/wp/wp-admin/options-permalink.php(212): flush_rewrite_rules() #5 {main} thrown in /home/duboisking/public_html/new/wp/wp-includes/class-wp-rewrite.php on line 1036
#2853377

Minesh
Supporter

Languages: English (English )

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

Hello. Thank you for contacting the Toolset support.

I review the debug information you shred with us and I found that you are using the PHP verion 8.4.19.

Toolset plugins are yet not fully compitible with PHP 8.4.x.

What if you try to downgrade the PHP version to PHP 8.2.x and check if that help you to resolve your issue.

#2853392

I tested 8.3, 8.2, 8.1, and 8.0 - ALL return the fatal error.
Deactivating Types the error goes away... but when I re-activate Types, I'm getting 404 errors for my CPTs - which is why I was trying to update my Permalinks.

Fatal error: Uncaught TypeError: Unsupported operand types: string & int in /home/duboisking/public_html/new/wp/wp-includes/class-wp-rewrite.php:1036 Stack trace: #0 /home/duboisking/public_html/new/wp/wp-includes/class-wp-rewrite.php(1413): WP_Rewrite->generate_rewrite_rules() #1 /home/duboisking/public_html/new/wp/wp-includes/class-wp-rewrite.php(1513): WP_Rewrite->rewrite_rules() #2 /home/duboisking/public_html/new/wp/wp-includes/class-wp-rewrite.php(1888): WP_Rewrite->refresh_rewrite_rules() #3 /home/duboisking/public_html/new/wp/wp-includes/rewrite.php(282): WP_Rewrite->flush_rules() #4 /home/duboisking/public_html/new/wp/wp-admin/options-permalink.php(212): flush_rewrite_rules() #5 {main} thrown in /home/duboisking/public_html/new/wp/wp-includes/class-wp-rewrite.php on line 1036
#2853393

Minesh
Supporter

Languages: English (English )

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

That is really strange.

What if you try to deactivate all third-party plugins excluding Toolset plugins and then check if you able to see it working when ONLY Toolset plugins active.
- Do you see any difference?

#2853394

NOTE: I downgraded to 7.4, and was able to access the Permalinks settings page with Types active.

However, a warning is still thrown:

Warning: A non-numeric value encountered in /home/duboisking/public_html/new/wp/wp-includes/class-wp-rewrite.php on line 1038

Disabling Types makes the warning go away. There is obviously a problem with strings/characters in my CPTs or taxonomies.
The warning does not display with debugging turned off in WP config.

#2853396

Disabled all plugins except Types and Toolset Blocks.

Same result. Warning with 7.4, Fatal errors with 8.0 and up.

#2853399

NOTE: When I tried to switch to Twenty-Twenty Five theme with Types enabled.. Fatal Error.
It DID switch themes. Disabled Types, and no errors switching themes.

#2853493

Minesh
Supporter

Languages: English (English )

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

This is really strange.

Can you please send me duplicator copy of your site and also shere details where I can see the fatal error accessing what post/page in backend or frontend?

Can youi please send me duplicator copy of your site:
- https://toolset.com/faq/provide-supporters-copy-site/

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

#2853562

Minesh, the site is too big for a Duplicator backup (2.93GB).
I am currently trying to migrate the site to a new server, so I am looking at rebuilding it on a clean install of WordPress and PHP 8.2.
It seems as though something in my CPTs is causing the error - so hopefully recreating them might fix it.

I will keep the old site/code on my dev server and give you Administrator access once I have got everything backed up.

#2853694

Christopher Amirian
Supporter

Languages: English (English )

Hello,

Christopher here, answering as Minesh is off. Please set the next reply as private to provide the access you mentioned.

Just FYI, we will need a version that we can break if needed. And you will have a way to retreive the previous state of the website.

Thanks.

#2853780

Obviously don't include n/a in the ftp path.. just use the IP

#2853818

Minesh
Supporter

Languages: English (English )

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

Can you please share details about steps I should follow that should help me to see the issue?

#2853846

As I said in the OP... go to Settings > Permalinks. This will trigger the fatal error.
hidden link

#2854387

Christopher Amirian
Supporter

Languages: English (English )

Hello,

Me again, as Minesh is off today. It is very hard to determine what might be the cause of the issue unless there is a version of the website that it is possible to do troubleshooting without the fear of breaking the website.

Since the fatal error happens while WordPress is generating rewrite rules, and since disabling Types removes the issue, the next thing to check is the slug / rewrite configuration of the Types custom post types and custom taxonomies.

- Go to Toolset → Post Types, edit each custom post type, and check the Options → Rewrite settings. Toolset uses these rewrite settings for the post type URLs and archive URLs.
- Review the custom taxonomies as well and check their slugs. Toolset creates taxonomies with slugs, and those slugs must not conflict with other rewrite structures.
- Please make sure there is no duplicate slug and that a taxonomy slug is not the same as a CPT slug. Toolset confirms duplicate slugs are not allowed, and using a taxonomy slug as the CPT slug can lead to permalink failures.
- Also, adding a page or post with the same slug of the custom post type might cause such a conflict.

But it can not be determined unless the custom post types are deactivated/deleted to their slug changed in a staging/copy environment one by one and checked.

Thanks.

#2854575

Thanks for the reply.
I am currently working on editing some duplicate slugs (I haven't resolved the fatal error yet), deactivating the various CPTs/taxonomies has NOT solved the problem yet.

Also, editing the slugs to make them unique has broken some custom code that I previously had help with:
Please see:
https://toolset.com/forums/topic/output-child-taxonomy-list/

... the code was comparing the current page slug to the taxonomy slug to display children. The reason it worked was because the slug of the page matched the taxonomy slug.

Since I'm changing the page slugs, this code no longer works.