-
-
Notifications
You must be signed in to change notification settings - Fork 57
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
page with numeric title generates numeric alias #1598
Comments
|
Does this affect Contao 4.4 or just 4.5? |
|
I can confirm this at least for 4.5. It doesn't make any difference wether the alias is generated or put in manually. Btw.: (Possibly related? #1508 ) |
This does not help unfortunately. We switched to the slug generator in Contao 4.5, so I have to know whether this issue occurs in Contao 4.4 as well. |
It doesn't. |
|
I can confirm that this issues does not occur in Contao 4.4. In Contao 4.4 the alias will also automatically be prepended with |
|
Sorry if this is obvious: What was the reason to disallow numeric aliases in the first place? |
|
I am guessing this is related to the decision to no allow pages to be accessible via their ID. |
|
@asaage I think this cannot be done without breaking backwards compatibility. For instance, we could change this line $pageModel = \PageModel::findPublishedByIdOrAlias($pageId);in the $pageModel = \PageModel::findByAliases([$pageId]);(or a new However, people who are using the |
|
Yeah.. methods like |
|
Page alias generation does only handle duplicates... core-bundle/src/Resources/contao/dca/tl_page.php Lines 1099 to 1110 in 21f90f7
( $arrCheck is defined out of scope by the way)
... so checking for numeric only values got missing I suppose? |
|
As discussed on the developer's meeting, we have to re-add the |
|
Fixed in b888454. |

If you create a page with a title that only contains numbers, the auto-generated alias will also only contain those numbers. However, you will then be unable to access that page in the frontend.
Reproduction in the Contao online demo:
This will redirect you to https://demo.contao.org/en/ - since Contao could not find that page. You can repeat these steps with any number.
In Contao 3, such automatically generated numeric aliases are prepended with
id-.The text was updated successfully, but these errors were encountered: