My problem is that the WordPress Publish button "randomly" gets disabled. So far it only happened when working on Toolset custom post type templates. When this happens, I can save the template as draft. After some time, the Publish button "randomly" is enabled again.
The post template contains a view retrieving custom post types with a geo-location field. There's a map showing markers based on that view. The view and post are inside a conditional block, which shows its content if "NOT (Current user role is empty)".
I am working in Chrome. There are warnings in the console, but no errors. I have tried disabling plugins, and working in a different browser. If I make a change outside the conditional block, the Publish button still does not enable.
Here's what solves the issue: move the view and map outside the conditional block. Save as draft or wait for the auto-save. The Publish button is now available again. I think the view is causing the problem, not so much the map.
What do you think? Are views that run conditionally messing up the WordPress editor?
Hello. Thank you for contacting the Toolset support.
The submit/update button will be available once the view block is completely processed. It will fire number of requested based on your view's configurations to render the output on your post admin screen.
The request time is depends on how good your server is to process number of requests as well as memory.
- What if you try to increate the memory by adding following line to code to your wp-config.php file:
Thanks for your reply Minesh. I checked and have WP_MEMORY_LIMIT on 512M. I can't set it higher on the test server I'm working on.
But honestly, I doubt if that is causing this. I know it can take even 30-60 seconds sometimes to load and render all data before the button gets enabled. But here it takes much longer, like 15 minutes or more. It solves immediately once I move the view. I also tried putting the view inside a Kadence Tabs block and Accordion block, and the same thing happens.
I think that the Toolset view should be available on page load and should not be "obstructed" by other logic or delayed loading. That's what it looks like.
*** Please make a FULL BACKUP of your database and website.***
I would also eventually need to request temporary access (WP-Admin and FTP) to your site. Preferably to a test site where the problem has been replicated if possible in order to be of better help and check if some configurations might need to be changed.
I have set the next reply to private which means only you and I have access to it.
There are 2 Toolset Content Templates:
1) Template for Travel guides: works fine (view in document root)
2) Test template Locations: has issues with the Publish button (view in conditional block)
When I login and tried to access the content template "Test template Locations" and once I refresh the page, I can see the update button is working as expected.
=> hidden link
Can you please confirm it works at your end as well.
I tried but it does not work for me. What does work is moving the view outside of the conditional block and wait for the auto-save, then the publish button switches to enabled again.
Is a view inside a conditional block supported? Should it work?
It's really strange. I work in Chrome normally. I now cleared the browser cache of Edge and tried there. Same problem. Even if I make a change to the page (add text to the paragraph tag), the button remains disabled.
When I drag the view outside the conditional block, the button gets enabled after 30 seconds or so.
I tested in Chrome and Firefox and it just works fine.
I was not aware that you were using the Microsoft Edge but as far as I remember the Edge browser is set to retire so I suggest you keep using either Chrome or Firefox.
Yeah, it's really weird. By the way, if I open the template, not make any changes, and close it, I always get a warning "Changes you made may not be saved." Not sure if that means something?
Perhaps leave this thread open until I perhaps find another clue. I really want to get this to work.