Skip Navigation

[Resolved] Slug conflict with Blocks

This support ticket is created 3 years, 2 months ago. There's a good chance that you are reading advice that it now obsolete.

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
8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 - -
13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 - -

Supporter timezone: America/New_York (GMT-04:00)

This topic contains 5 replies, has 2 voices.

Last updated by Christian Cox 3 years ago.

Assisted by: Christian Cox.

Author
Posts
#1930207

Hi, I've a no-wordpress website in the root of my domain and a WordPress install inside /present/ directory. The page mydomain.com/1788/ exists on the website, but it doesn't exists under wordpress (/present/1788/). I created a new Custom post type, If I give it the slug /1788/ and Blocks is active I get this error message:

Fatal error: Uncaught InvalidArgumentException in /var/www/html/mjchs/present/wp-content/plugins/de-toolset-blocks/vendor/toolset/toolset-common/inc/autoloaded/post_type/from_types.php:345 Stack trace: 
#0 /var/www/html/mjchs/present/wp-content/plugins/de-toolset-blocks/vendor/toolset/toolset-common/inc/autoloaded/post_type/repository.php(131): Toolset_Post_Type_From_Types->set_registered_post_type() 
#1 /var/www/html/mjchs/present/wp-includes/class-wp-hook.php(287): Toolset_Post_Type_Repository->finish_loading_registered_post_types() 
#2 /var/www/html/mjchs/present/wp-includes/class-wp-hook.php(311): WP_Hook->apply_filters()
#3 /var/www/html/mjchs/present/wp-includes/plugin.php(484): WP_Hook->do_action()
#4 /var/www/html/mjchs/present/wp-settings.php(557): do_action() 
#5 /var/www/html/mjchs/present/wp-config.php(90): require_once('/var/www/html/m...') 
#6 /var/www/html/mjchs/present/wp-load.php(37): require_once('/var/www/html/m...') 
#7 /var/www/html/mjchs/present/wp-admin/admin.php(34): require_once('/var/www/html/m...') 
#8 in /var/www/html/mjchs/present/wp-content/plugins/de-toolset-blocks/vendor/toolset/toolset-common/inc/autoloaded/post_type/from_types.php on line 345

If I deactivate Blocks it works, if use a different slug with Blocks it works fine. I tried cleaning the DB with WP Sweep to remove orphans items. I also searched '1788' with Better Search Replace plugin and I didn't find anything.

Can you help me?

#1930387
Screen Shot 2021-02-02 at 4.14.09 PM.png

Hello, thanks for the report. I'm able to see the same issue if I create a CPT in my local site using any numeric slug, regardless of having a non-WP site in the same domain. Let me ask my 2nd tier support team to take a look. It seems that we should either support numeric slugs in Blocks or prevent creating CPTs with numeric slugs in Types. Until I get some feedback, you might be able to work around this temporarily by using a slug that begins with a text character like "temp1788" instead. If the CPT is created with Types, you can edit the CPT in Toolset > Post Types and use the Rewrite option "Custom URL Format" to change the URL slug to 1788 (screenshot). Then the CPT URLs will include .../1788/... instead of .../temp1788/..., and Blocks will not throw a Fatal Error. I'll let you know what I find out from 2nd tier support.

#1931735

Quick update- my 2nd tier team has escalated this issue to the developers and we're waiting for feedback. I'll keep you posted here.

#1936801

This issue will be resolved in the next release of Views/Blocks. I'll keep you posted as I receive information about that release schedule.

#1938057

Unfortunately there was a miscommunication among the team, and this issue was not resolved in today's hotfix release. The team has pushed this issue into the following release, and I'll keep you updated on the schedule here.

#2020725

Hello, our team is now in the process of pushing out the latest Toolset release. If you have not yet been prompted to update to the latest versions, you may need to go to wp-admin > Plugins > Add New, then click the Commercial tab. In the Toolset Installer panel, click "Check for Updates", and the automatic installer should find the latest versions of Toolset plugins ready to install. The fix for this issue is included in the latest updates. Thanks for your patience while we worked to resolve this issue. Feel free to close here or let me know if the issue is not fully resolved.

This ticket is now closed. If you're a WPML client and need related help, please open a new support ticket.