Hello,
I am trying to use Custom Permalinks (tried Permalinks Customizer plugin too) for Toolset CPT content I've imported. It all seems to be working fine until I try to edit a template for a CPT and I'm stuck with Saving/Updating the template. I've already gone through the debugging process of installing/uninstalling plugins and determined that it's the 2 Permalinks modules (tested separately) that are causing the issue.
Just to reiterate, the plugin(s) seem to be working fine together with Toolset when I edit and publish posts. It's only when I try to save/update a template when the process hangs. Is this a known compatibility issue?
Thank you.
Hi,
Thank you for contacting us and I'd be happy to assist.
During testing on my website, I was able to reproduce this issue.
When the ‘Custom Permalinks’ plugin (https://wordpress.org/plugins/custom-permalinks/) is active, the content template edit screen appears to be stuck when it is updated. The actual changes made to the template are saved correctly, however, the AJAX spinner keeps on spinning.
I've shared these findings with the concerned team for further review and will keep you updated through this ticket.
regards,
Waqar
Thank you for waiting.
I've received an update and using the following code snippet, you can stop the 'Custom Permalinks’ plugin's script file from loading on the content template edit screen:
/**
* Dequeue custom_permalinks script when editing Toolset Content Template
*/
add_action( 'current_screen', 'ts_current_screen' );
function ts_current_screen( $screen ){
if ( in_array( $screen->post_type, array( 'view-template' ) ) )
{
add_action( 'admin_print_footer_scripts', 'ts_dequeue_custom_permalinks_assets', 1 );
}
}
function ts_dequeue_custom_permalinks_assets(){
wp_dequeue_script( 'custom-permalinks-form' );
}
Note: The above code snippet can be included through either Toolset's custom code feature ( ref: https://toolset.com/documentation/adding-custom-code/using-toolset-to-add-custom-code/ ) or through the active theme's "functions.php" file.
I hope this helps and please let me know how it goes.
My issue is resolved now. Thank you!