Make segment available to all users: missing option on file storage read-only
Hello,
I’m contacting you about an issue concerning the Save segment (saved filters).
In particular, the option “Make available for all users” checkbox is missing.
From our tests, here’s how to reproduce:
– AC pro 6.4.20 + WP 6.7.1
– hooks enabled:
add_filter(‘acp/storage/file/directory’, fn () => ‘etc/admin-columns’);
add_filter(‘acp/storage/file/directory/writable’, ‘__return_false’);
For a given CPT (let’s say the default article):
– have a saved PHP file configuration
– add a new custom view to the table (which will be saved in DB)
Result:
“Make available for all users” option is:
– NOT available on the default view (PHP file one)
– AVAILABLE on the additional view (DB stored one)
Documentation says :
When moving to a live-environment, you probably want your local file settings to be loaded as read-only and make the database the default storage engine again. The following hook allows you to easily switch between read-only storage or writable storage.
But I’m wondering if there’s an issue when:
– Base view are stored in PHP
– Segments are stored in DB
The strange thing is, the user can still save a segment for himself, and those are saved in the DB. But the checkbox to make it available for all users is not shown.
I checked and my user has the “manage_admin_columns” permission.
If I go back to my test case, If I export the additional view (where the checkbox is shown), and add it to PHP file as default view: the checkbox is NOT available.
I tried to debug the JS side around ac-modal-create-segment by adding a checkbox and manually logging some objects. But as JS is minified and seems some svelte obfuscated, I’m not able to find what the condition checked to display the checkbox.
Thank you for your help.
You must be logged in to reply to this topic.