aimeos / ai-typo3

TYPO3 adapter for Aimeos web shops and e-commerce solutions
https://aimeos.org/TYPO3
GNU Lesser General Public License v3.0
72 stars 6 forks source link

Is there a reason for always appending controller / action to URL? #2

Closed AndreasA closed 7 years ago

AndreasA commented 8 years ago

From what I can see the aimeas_typo3 extension by default only defines plugins with one action and controller.

If one were to use the feature skipDefaultArguments normally the controller and action parameter are only appended, if they are necessary, not default action of plugin but as the URL is not built by using uriFor so it basically is ignored. However, I guess it not that easy because in order to now have those parameters when linking from the list plugin to the detail plugin, the pluginName also has to be added to the link paraemters in order for them to be removed correctly.

Due to the realurl configuration it isn't that important anyway but...

aimeos commented 8 years ago

The URL view helper uses the uriFor() method and that configuration option could be added. Only the T3Cli implementation does not because TYPO3 is buggy and doesn't set up the environment for the scheduler correctly to get a usable uriFor() method.

AndreasA commented 8 years ago

As mentioned one would also need to ensure the URLs are correctly referencing the intended pluginNames, otherwise this still would not work correctly.

This is what happens if the feature is enabled in the UriBuilder: ` /**

and this is the check if the feature is enabled: if ($this->environmentService->isEnvironmentInFrontendMode() && $this->configurationManager->isFeatureEnabled('skipDefaultArguments')) { $controllerArguments = $this->removeDefaultControllerAndAction($controllerArguments, $extensionName, $pluginName); }

Regarding setup: I think TYPO3 doesn't setup any Frontend comonents in the scheduler, so therefore the URI would not create the correct values - especially without manually setting pluginName extenionName etc.

aimeos commented 7 years ago

skipDefaultArguments is part of the TS config in the 2017.x releases