Skip Navigation

This thread is resolved. Here is a description of the problem and solution.

Problem:
If you're experiencing issues accessing the Settings > Permalink page in the WordPress admin and encountering a PHP Fatal error related to type mismatch in

/wp-includes/class-wp-rewrite.php

, it might be due to a conflict with String translation.
Solution:
We recommend following these steps:
1. Navigate to Toolset Types >> Post Types page.
2. Edit the Slides and Specials post types.
3. In the Options metabox, add "EP_PERMALINK" in the "Permalink epmask" field.
4. Save the post type settings.
This should resolve the issue. For more details, you can refer to a related discussion on our forum: Toolset support forum.

If this solution does not apply to your case, or if it seems outdated, we highly recommend checking related known issues at https://wpml.org/known-issues/, verifying the version of the permanent fix, and confirming that you have installed the latest versions of themes and plugins. If issues persist, please open a new support ticket.

This is the technical support forum for WPML - the multilingual WordPress plugin.

Everyone can read, but only WPML clients can post here. WPML team is replying on the forum 6 days per week, 22 hours per day.

Tagged: 

This topic contains 0 reply, has 0 voices.

Last updated by andreaP-96 6 months, 3 weeks ago.

Assisted by: Noman.

Author Posts
December 4, 2024 at 9:17 am

andreaP-96

Background of the issue:
I am trying to access the Settings > Permalink page on the WordPress admin. The issue can be seen when attempting to access this page. The server log shows an error when trying to access: GET /wp-admin/options-permalink.php HTTP/1.0.

Symptoms:
I expected to access the page, but instead, I got a WordPress error. The server log shows a PHP Fatal error: Uncaught TypeError: Unsupported operand types: string & int in /var/www/vhosts/scent-of-sicily.com/httpdocs/wp-includes/class-wp-rewrite.php:1036. It appears to be caused by String translation.

Questions:

December 4, 2024 at 10:15 am
December 4, 2024 at 4:47 pm #16478076

Noman
WPML Supporter since 06/2016

Languages: English (English )

Timezone: Asia/Karachi (GMT+05:00)

I’ve followed to the below steps:

1. Went to Toolset Types >> Post Types page.
2. Edited the Slides and Specials post types one by one:
hidden link
hidden link

3. Open the Options metabox section as you can see in the attached screenshot.
4. Added the “EP_PERMALINK” text in the “Permalink epmask” field as you can see in the attached screenshot.
5. Pressed the Save post type button and the issue is gone.

Here is a related ticket link for more details:
https://toolset.com/forums/topic/types-error-and-conflict/#post-2706397

Please let me know if this resolves the issue or if you need further assistance with this issue.

Thank you

Before - Slide post type.png
options metabox.png
Permalink epmask.png
December 5, 2024 at 9:03 am #16480150

andreaP-96

Hi, I followed the steps in the production website and when I save it gives me error.

Refreshig the page show me the EP_PERMALINK correctly, but permalinks page till doesn't work.

December 5, 2024 at 10:07 am #16480791

andreaP-96

This is the error in the prodiuction site:

AH01071: Got error 'PHP message: PHP Fatal error: Uncaught TypeError: Unsupported operand types: string & int in /var/www/vhosts/scent-of-sicily.com/httpdocs/wp-includes/class-wp-rewrite.php:1036\nStack trace:\n#0 /var/www/vhosts/scent-of-sicily.com/httpdocs/wp-includes/class-wp-rewrite.php(1410): WP_Rewrite->generate_rewrite_rules()\n#1 /var/www/vhosts/scent-of-sicily.com/httpdocs/wp-includes/class-wp-rewrite.php(1509): WP_Rewrite->rewrite_rules()\n#2 /var/www/vhosts/scent-of-sicily.com/httpdocs/wp-includes/class-wp-rewrite.php(1884): WP_Rewrite->refresh_rewrite_rules()\n#3 /var/www/vhosts/scent-of-sicily.com/httpdocs/wp-includes/rewrite.php(282): WP_Rewrite->flush_rules()\n#4 /var/www/vhosts/scent-of-sicily.com/httpdocs/wp-admin/options-permalink.php(212): flush_rewrite_rules()\n#5 {main}\n thrown in /var/www/vhosts/scent-of-sicily.com/httpdocs/wp-includes/class-wp-rewrite.php on line 1036', referer: hidden link

December 5, 2024 at 10:26 am #16480903

Noman
WPML Supporter since 06/2016

Languages: English (English )

Timezone: Asia/Karachi (GMT+05:00)

Thanks for the feedback. Could you please try to follow the below steps on live site and let me know how it goes:

1. Take a backup of your site first for safety reasons.
2. Go to the Toolset Types >> Post Types page.
3. Edit each custom post type one by one (including Slides and Specials).
4. Open the Options metabox section of each post type.
5. Add the “EP_PERMALINK” text in the “Permalink epmask” field if it’s missing and press the Save post type button.
6. Clear all sorts of site/server/CDN cache and see if this resolves the issue.

7. If the above steps don’t help, please provide temporary access (WP-Admin and FTP Login info) to your site, so that I can look into your setup and debug the issue.

Your next answer will be private, meaning only you and I can access it.

=== Please backup your database and website ===

✙ I would additionally need your permission to deactivate and reactivate Plugins and the Theme and to change configurations on the site. This is also a reason the backup is essential.

Thank you

December 9, 2024 at 1:54 pm #16493435

andreaP-96

Thank you!