Skip to content
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

Object Preview for Mulit-Site #5462

Closed
dpfaffenbauer opened this issue Dec 17, 2019 · 6 comments
Closed

Object Preview for Mulit-Site #5462

dpfaffenbauer opened this issue Dec 17, 2019 · 6 comments

Comments

@dpfaffenbauer
Copy link
Contributor

Is there a specific reason for this?

@dpfaffenbauer
Copy link
Contributor Author

I think I just opened the pandora box.... Object Preview doesn't work with multisite anyway, cause pimcore_object_preview disables site resolving and thus the route cannot be resolved :/

@brusch
Copy link
Member

brusch commented Dec 17, 2019

Preview can only work on the same hostname -> sessions.

@dpfaffenbauer
Copy link
Contributor Author

ok, but how do you work with multiple sites, with different Product Classes and sort of the same routes?

Current Solution is something like this:

    1 => [
        "id" => 1,
        "name" => "agro_product_detail",
        "pattern" => "/(.*?)\\/(.*?)\\~p([0-9]+)/",
        "reverse" => "/%type/%name~p%id",
        "module" => NULL,
        "controller" => "@AgroBundle\\Controller\\ProductController",
        "action" => "detail",
        "variables" => "type,name,id",
        "defaults" => NULL,
        "siteId" => [

        ],
        "priority" => 2,
        "creationDate" => 1501773148,
        "modificationDate" => 1570003888
    ],
    10 => [
        "id" => 10,
        "name" => "bueho_product_detail",
        "pattern" => "/(.*?)\\/(.*?)\\~bp([0-9]+)/",
        "reverse" => "/%type/%name~bp%id",
        "module" => NULL,
        "controller" => "@BuehoBundle\\Controller\\ProductController",
        "action" => "detail",
        "variables" => "_locale,name,id",
        "defaults" => NULL,
        "siteId" => [

        ],
        "priority" => 2,
        "creationDate" => 1501773148,
        "modificationDate" => 1570003888
    ],

only difference is the Identifier at the end of the route, but that is not a viable solution. Routes support usage for certain sites only, but that can never work with Object Preview currently...

@dpfaffenbauer
Copy link
Contributor Author

Another solution, separate Routes for preview:

    11 => [
        "id" => 11,
        "name" => "bueho_product_preview",
        "pattern" => "/bueho\\/preview\\~([0-9]+)/",
        "reverse" => "/bueho/preview~%id",
        "module" => NULL,
        "controller" => "@BuehoBundle\\Controller\\ProductController",
        "action" => "detail",
        "variables" => "id",
        "defaults" => NULL,
        "siteId" => [

        ],
        "priority" => 2,
        "creationDate" => 1501773148,
        "modificationDate" => 1570003888
    ],
    12 => [
        "id" => 12,
        "name" => "agro_product_preview",
        "pattern" => "/agro\\/preview\\~([0-9]+)/",
        "reverse" => "/agro/preview~%id",
        "module" => NULL,
        "controller" => "@AgroBundle\\Controller\\ProductController",
        "action" => "detail",
        "variables" => "id",
        "defaults" => NULL,
        "siteId" => [

        ],
        "priority" => 2,
        "creationDate" => 1501773148,
        "modificationDate" => 1570003888
    ],

Where the start of the route actually is the site-root-path. So, I can resolve the theme for it and render it correct.... Still feels a bit tricky though. Shouldn't it prefix the site path for a AdminRequest automatically?

@dpfaffenbauer dpfaffenbauer changed the title parse_url for Object Preview makes multi-site non-working Object Preview for Mulit-Site Dec 17, 2019
@stale
Copy link

stale bot commented Mar 15, 2022

Thanks a lot for reporting the issue. The issue was not considered by us as "Priority" or "Backlog", so we're not gonna work on that anytime soon. In case this is a bug report, please create a pull request fixing the issue, we'll then review it as soon as possible. If you're interested in contributing a feature, please contact us first here before creating a pull request, we'll then decide whether we'd accept it or not. Thanks for your understanding.

@stale stale bot added the PR Welcome label Mar 15, 2022
@dpfaffenbauer
Copy link
Contributor Author

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

No branches or pull requests

2 participants