Skip to content

IBX-10091 Preview Siteaccess: Show hidden locations #572

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

thiagocamposviana
Copy link

@thiagocamposviana thiagocamposviana commented Jun 2, 2025

🎫 Issue IBX-10091

We implemented some changes to the Ibexa 4.x kernel for a client to be able to configure a preview siteaccess where it is possible to browse hidden locations, this is achieved via a YML setting. This is working well for the client project.

We need that Ibexa adjust our solution and hopefully make it part of the kernel.

With this change it is possible to enable the preview mode for a certain siteaccess with this setting:

diff --git a/config/app/services.yaml b/config/app/services.yaml
index babb99f59e..59047f7764 100644
--- a/config/app/services.yaml
+++ b/config/app/services.yaml
@@ -4,8 +4,13 @@
 # Put parameters here that don't need to change on each machine where the app is deployed
 # https://symfony.com/doc/current/best_practices.html#use-parameters-for-application-configuration
 parameters:
+  #ibexa.$siteaccessName.show_hidden_locations: true

A possible improvement would be to move the Mapper::isPreviewMode to somewhere else ( see src/lib/Persistence/Legacy/Content/Location/Mapper.php ).

Note it is necessary to use a different redis cache namespace for the preview siteaccess, which is done when configuring the siteaccess like usual.

Here is a recommended redis config:

cache.preview:
    public: true
    class: Symfony\Component\Cache\Adapter\NullAdapter
    tags:
        - { name: cache.pool }

Then do this:

ibexa:
    system:
        preview_group:
            cache_service_name: 'cache.preview'

Copy link

sonarqubecloud bot commented Jun 2, 2025

@adamwojs
Copy link
Member

adamwojs commented Jun 3, 2025

Hi @thiagocamposviana! Thank you for contribution. We will evaluate proposed changes and back to you with feedback as soon as possible.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants