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
Comments
I think I just opened the pandora box.... Object Preview doesn't work with multisite anyway, cause |
Preview can only work on the same hostname -> sessions. |
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... |
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? |
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. |
I think this is sort of done with https://pimcore.com/docs/pimcore/10.6/Development_Documentation/Objects/Object_Classes/Class_Settings/Preview_Generator.html |
pimcore/bundles/AdminBundle/Controller/Admin/DataObject/DataObjectController.php
Line 2085 in e4e4b58
Is there a specific reason for this?
The text was updated successfully, but these errors were encountered: