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

Update UrlManager.php #294

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

Update UrlManager.php #294

wants to merge 2 commits into from

Conversation

ynamite
Copy link
Contributor

@ynamite ynamite commented May 15, 2024

Prüfen ob die übergebene clang ID mit dem Profil übereinstimmt.

Wenn das nicht geprüft wird, wird der Datensatz womöglich nicht gefunden wenn ein Datensatz in verschiedenen Sprachen/Profilen aber im gleichen Namespace verfügbar sein soll.

Bei mir äusserte sich das Problem, wenn ich in Sprache 1 per rex_getUrl einen Link zum gleichen Datensatz in Sprache 2 ausgeben wollte.

Prüfen ob die übergebene clang ID mit dem Profil übereinstimmt.

Wenn das nicht geprüft wird, wird der Datensatz womöglich nicht gefunden wenn ein Datensatz in verschiedenen Sprachen/Profilen aber im gleichen Namespace verfügbar sein soll. 

Bei mir äusserte sich das Problem, wenn ich in Sprache 1 per rex_getUrl einen Link zum gleichen Datensatz in Sprache 2 ausgeben wollte.
@@ -359,6 +359,11 @@ public static function getRewriteUrl(\rex_extension_point $ep)
continue;
}

// Prüfen ob die clang ID mit dem Profil übereinstimmt
if ($clangId != $profile->getArticleClangId()) {
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

$profile->getArticleClangId()

hier kann auch 0 zurückkommen. Das passiert, wenn man im Profil "alle Sprachen" auswählt.
Kannst du diesen Fall mit überprüfen?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ist erledigt, so gut?

Zusätzliche Prüfung ob $profile->getArticleClangId() != 0
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.

None yet

2 participants