Home › Toolset Professional Support › [Closed] I have a conflict with permalinks article name and the Toolset plugin
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.
This topic contains 8 replies, has 1 voice.
Last updated by Christopher Amirian 1 month ago.
Assisted by: Christopher Amirian.
I am trying to: run together the permalinks article name and the toolset types plugin
Link to a page where the issue can be seen: WordPress Critical error blocks the website hidden link
I expected to see: it was working before
Instead, I got: WordPress Critical error blocking the website, I can only get it back by renaming the Types plugin on the server with file manager
Hi,
Welcome to Toolset support. Would you please enable the debug mode so we can see what is the error that happening under the hood?
Would you please access your website files and edit the "wp-config.php" file on the root folder of your WordPress installation and add the code below into the file:
define( 'WP_DEBUG', true ); define( 'WP_DEBUG_LOG', true ); define( 'WP_DEBUG_DISPLAY', true );
Please add the code above the line below:
/* That's all, stop editing! Happy blogging. */
For more information:
https://wpml.org/documentation/support/debugging-wpml/
Please consider that we tested, and the problem you mentioned does not happen on a minimal installation, you can see here:
hidden link
So you can test if something in conjunction has the problem.
Thanks.
Hi Christopher, sorry I did answered in the mail, but then realised it was going nowhere,
I am getting these messages
st_in_time was called incorrectly. Translation loading for the health-check domain was triggered too early. This is usually an indicator for some code in the plugin or theme running too early. Translations should be loaded at the init action or later. Please see Debugging in WordPress for more information. (This message was added in version 6.7.0.) in /home/customer/www/stsenzatitolo.com/public_html/st/wp-includes/functions.php on line 6121. As I found out, this has to do with the domain 'freemium'
While with QueryMonitor, when I try to change the permalinks, I get these messages
for what I can tell there is a problem with the rewrite rules, I set up my toolset taxonomies following a default configuration
Uncaught Error: Unsupported operand types: string & int
in /home/customer/www/stsenzatitolo.com/public_html/st/wp-includes/class-wp-rewrite.php on line 1036
Call stack:
1. WP_Rewrite::generate_rewrite_rules('/exhibitions/%exhibitions%', '', true, false, false, true, true)
wp-includes/class-wp-rewrite.php:1413
2. WP_Rewrite::rewrite_rules()
wp-includes/class-wp-rewrite.php:1513
3. WP_Rewrite::refresh_rewrite_rules()
wp-includes/class-wp-rewrite.php:1888
4. WP_Rewrite::flush_rules(true)
wp-includes/class-wp-hook.php:324
5. WP_Hook::apply_filters(NULL, array)
wp-includes/class-wp-hook.php:348
6. WP_Hook::do_action(array)
wp-includes/plugin.php:517
7. do_action('wp_loaded')
wp-settings.php:749
8. require_once('/home/customer/www/s...l/st/wp-settings.php')
wp-config.php:90
9. require_once('/home/customer/www/s...tml/st/wp-config.php')
wp-load.php:50
10. require_once('/home/customer/www/s..._html/st/wp-load.php')
wp-admin/admin.php:35
11. require_once('/home/customer/www/s...t/wp-admin/admin.php')
wp-admin/options-permalink.php:10
And on turning on Toolset, I have
Uncaught Error: Unsupported operand types: string & int
in /home/customer/www/stsenzatitolo.com/public_html/st/wp-includes/class-wp-rewrite.php on line 1036
Call stack:
1. WP_Rewrite::generate_rewrite_rules('/exhibitions/%exhibitions%', '', true, false, false, true, true)
wp-includes/class-wp-rewrite.php:1413
2. WP_Rewrite::rewrite_rules()
wp-includes/class-wp-rewrite.php:1513
3. WP_Rewrite::refresh_rewrite_rules()
wp-includes/class-wp-rewrite.php:1888
4. WP_Rewrite::flush_rules(true)
wp-includes/rewrite.php:282
5. 5. flush_rewrite_rules()
wp-admin/options-permalink.php:212
And the only way to get out of here is to rename the Type plugin folder as xtypes, the plugin gets disconnected, and I can set the permalink option to default.
I am also getting this error:
Warning: Undefined variable $post in /home/customer/www/stsenzatitolo.com/public_html/st/wp-content/themes/theretailer-child/woocommerce/single-product/meta.php on line 54
for this line of code,
<?php echo the_terms( $post, 'tag-subject', '<span class="field_descr">subject: </span>', ', ', ' '.'</br>' ); ?>
The taxonomy is displayed correctly, but in php I get the above error, is there a better call for the toolset taxonomy 'tag-subject'?
thanks
Federico
Hi Federico,
Thanks for the detailed traces — they’re very helpful.
This part of your stack is the clue:
WP_Rewrite::generate_rewrite_rules('/exhibitions/%exhibitions%', '', true, …) ^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^
- The permalink base being fed into WordPress is '/exhibitions/%exhibitions%'. That looks like a taxonomy placeholder (%…%) was put into the global permalink structure, or a CPT/tax rewrite was set with a placeholder where WordPress expects a literal slug.
- The second parameter (endpoint mask) is an empty string ('') where WordPress expects an integer bitmask. With recent WordPress/PHP, that turns into the fatal “Unsupported operand types: string & int”.
In short, the rewrite rules are being generated from an invalid structure, and when Types is active (because it registers CPTs/taxonomies and triggers a flush) WordPress hits that bad structure and dies.
See if the steps below fixes the problem:
Reset global permalinks
- Go to Settings → Permalinks.
- Choose Post name so the structure is /%postname%/.
(Make sure there’s no %exhibitions% or any taxonomy placeholder here.)
- Click Save Changes twice.
Let Types define the CPT base
- Re-enable Toolset Types.
- Go to Toolset → Post Types → Exhibitions → Edit.
- “Slug” should be a simple slug, e.g. exhibitions.
- Keep “Has archive” on/off as you need.
- Do not include any %…% placeholder in this field.
- Save.
Flush rewrite rules once more
- Visit Settings → Permalinks again and click Save Changes (no changes needed; this forces a flush).
See if it fixes the issue.
Thanks.
Hi Christopher,
it kind of worked for tags and categories,
my only issue is that I have to take off the rewrite option from the two post-types I have created with Toolset
I have an artists post-type
and without the rewrite it works with the basic link
hidden link
but not as before with the permalink
hidden link
(attaching screenshots of the post-type configuration)
when I try to set the rewrite option i get the following error message from querymonitor
Uncaught Error: Unsupported operand types: string & int
in /home/customer/www/stsenzatitolo.com/public_html/st/wp-includes/class-wp-rewrite.php on line 1036
Call stack:
WP_Rewrite::generate_rewrite_rules('/artist/%artist%', '', true, false, false, true, true)
wp-includes/class-wp-rewrite.php:1413
WP_Rewrite::rewrite_rules()
wp-includes/class-wp-rewrite.php:1513
WP_Rewrite::refresh_rewrite_rules()
wp-includes/class-wp-rewrite.php:1888
WP_Rewrite::flush_rules(true)
wp-includes/rewrite.php:282
flush_rewrite_rules()
wp-content/plugins/types/vendor/toolset/types/includes/classes/class.types.admin.edit.post.type.php:119
Types_Admin_Edit_Post_Type::form()
wp-content/plugins/types/vendor/toolset/types/admin.php:635
wpcf_admin_menu_edit_type_hook('')
wp-includes/class-wp-hook.php:324
WP_Hook::apply_filters(NULL, array)
wp-includes/class-wp-hook.php:348
WP_Hook::do_action(array)
wp-includes/plugin.php:517
do_action('load-toolset_page_wpcf-edit-type')
wp-admin/admin.php:238
best Federico
Hi Christopher, I have reverted the post-type options to the default ,
and it all works even with the rewrite !!
thanks
Federico
I hoped it was resolved but setting the default EP_PERMALINK.
created the error below and now I can't get up Toolset anymore,
I have tried to cancel the option from mysql and in the wp-content/plugins/types/vendor/toolset/types/embedded/includes/custom-types.php:342 but it is not working, and I fear I will have to reinstall the plugin.
anyway I can get some help by letting you in on the website ?
or any clue
thanks
Federico
Uncaught Error: Undefined constant "EP_PERMALINK."
in /home/customer/www/stsenzatitolo.com/public_html/st/wp-content/plugins/types/vendor/toolset/types/embedded/includes/custom-types.php on line 342
Call stack:
constant('EP_PERMALINK.')
wp-content/plugins/types/vendor/toolset/types/embedded/includes/custom-types.php:342
wpcf_custom_types_register('exhibitions', array)
wp-content/plugins/types/vendor/toolset/types/embedded/includes/custom-types.php:123
wpcf_custom_types_init()
wp-content/plugins/types/vendor/toolset/types/embedded/functions.php:117
wpcf_init_custom_types_taxonomies('')
wp-includes/class-wp-hook.php:324
WP_Hook::apply_filters(NULL, array)
wp-includes/class-wp-hook.php:348
WP_Hook::do_action(array)
wp-includes/plugin.php:517
do_action('init')
wp-settings.php:727
require_once('/home/customer/www/s...l/st/wp-settings.php')
wp-config.php:90
require_once('/home/customer/www/s...tml/st/wp-config.php')
wp-load.php:50
require_once('/home/customer/www/s..._html/st/wp-load.php')
wp-blog-header.php:13
require('/home/customer/www/s...t/wp-blog-header.php')
/home/customer/www/stsenzatitolo.com/public_html/index.php:17
Hi Christopher,
I have reinstalled the backup and applied your procedure again, and besides the rewrite option in the two post-types, the rest works, so I'll stick to this version.
I have only the toolset types plugin activated; any other of the toolset plugins is mandatory?
thanks
Federico
Hi Federico,
The Toolset Types is to create the Custom Post Types, but the Toolset Blocks is also needed if you want to create views.
Thanks.
The topic ‘[Closed] I have a conflict with permalinks article name and the Toolset plugin’ is closed to new replies.