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

[Routes] bundle prefix not removed as expected #4381

Closed
craigh opened this issue Jul 7, 2020 · 3 comments
Closed

[Routes] bundle prefix not removed as expected #4381

craigh opened this issue Jul 7, 2020 · 3 comments
Labels
Milestone

Comments

@craigh
Copy link
Member

@craigh craigh commented Jul 7, 2020

In creating a custom route, the option exists to "Prepend bundle prefix" (or not). If this is disabled, the route still requires the prefix.

Q A
Zikula Version 3.0.0
PHP Version 7.3.9

Expected Behavior

The prefix is not required.

Current Behavior

Screen Shot 2020-07-07 at 8 30 40 AM

Screen Shot 2020-07-07 at 8 33 06 AM

@craigh craigh added the Bug label Jul 7, 2020
@craigh craigh added this to the 3.0.1 milestone Jul 7, 2020
@Guite
Copy link
Member

@Guite Guite commented Jul 7, 2020

Note: this uses $options but seems to ignore $route->getPrependBundlePrefix(); possibly both should be checked and considered.

@Guite
Copy link
Member

@Guite Guite commented Jul 7, 2020

@craigh said:

problem is here

$zkNoBundlePrefix = $route->getOption('zkNoBundlePrefix');
if (!isset($zkNoBundlePrefix) || !$zkNoBundlePrefix) {
$untranslatedPrefix = $this->getUrlString($module);
if ($this->translator->getCatalogue($locale)->has($untranslatedPrefix, strtolower($module))) {
$prefix = $this->translator->trans(/** @Ignore */$untranslatedPrefix, [], strtolower($module), $locale);
} else {
$prefix = $untranslatedPrefix;
}
$i18nPattern = '/' . $prefix . $i18nPattern;
}

@craigh
Copy link
Member Author

@craigh craigh commented Jul 9, 2020

fixed by #4389

@craigh craigh closed this as completed Jul 9, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants