Posts end up with the same slug when editing in bulk mode
-
Hi Aliya,
Hi Sami,I ran into a problem with your plugin. It seems, you are using global variables in your functions, this leads to the problem, that all posts end up with the same slug, when one’s editing them in bulk mode or within a query programmatically.
It tooks the slug of the first page inside this query and then adds it to all further posts, so all previous slugs got replaced by the same one.
Can you replicate my issue? Is there any way to handle it different, without these variables?
When you’re saving data in $_REQUEST (global), it won’t get resetted on the next post edit. We’ve solved that with a workaround so far:
foreach($_REQUEST as $key => $val) { if(preg_match("/^permalinks_customizer/", $key)) { unset($_REQUEST[$key]); } }
Maybe this helps you, to understand the problem better. It would be great, to solve this issue inside the plugin itself, because it also happens when one’s for example switching the post type of some posts with the post type switcher plugin, which is very common.
- The topic ‘Posts end up with the same slug when editing in bulk mode’ is closed to new replies.