You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi @cobwebch,
first of all I'm sorry for the long post, this is a small problem but a little hard to analyze.
Actually in the link browser there are displayed both the default language records and the translated records.
I found out that, at least in my installations, if an editor picks a translated record then the generated link causes problems with the fragile Realurl 2.
Instead if the editor picks the default language records there are no problem and even the translated pages display the links to the right translated records.
By instance, these are the links that appear in EXT:news list for default and second language:
Default language: index.php?id=44&L=0&tx_news_pi1%5Bnews%5D=100181&tx_news_pi1%5Bcontroller%5D=News&tx_news_pi1%5Baction%5D=detail&cHash=6c102a4644eba9390869bb79afd60104
Second language: index.php?id=44&L=1&tx_news_pi1%5Bnews%5D=100181&tx_news_pi1%5Bcontroller%5D=News&tx_news_pi1%5Baction%5D=detail&cHash=6c102a4644eba9390869bb79afd60104
Everything is ok and the only thing that changes is the L parameter.
Now, if we use instead the link browser and we pick the second language record the link becomes: index.php?id=44&L=1&tx_news_pi1%5Bnews%5D=100182&tx_news_pi1%5Bcontroller%5D=News&tx_news_pi1%5Baction%5D=detail&cHash=68d9bb161c64e5bc17baf08180d21202
Here what changed are the parameters: L; news uid; cHash.
For Realurl 2 obviously it is a different url even if it display the correct content.
The real problem is that at the end we have 2 different urls with the same content, bad for SEO.
I tried to find a way to display only the default language record in the link browser but I'm unable to find a viable solution.
The problem could be easily solved if there was a way to set to false $this->localizationView of DatabaseRecordList so only the default language records would be displayed in the link browser but I can't find a way to set it without hacking the core.
One ugly solution could be to temporary store $GLOBALS['TCA'][$table]['ctrl']['languageField'] and then unset it before calling DatabaseRecordList->getTable(). But this need also to use getTable hook to change the where clause.
Please, do you have any other idea?
The text was updated successfully, but these errors were encountered:
As a temporary fix I added this css to hide non-default language records in link browser: #typo3-browse-links-php .recordlist tr { display: none; } #typo3-browse-links-php .recordlist tr[data-l10nparent="0"] { display: table-row; }
Hi @cobwebch,
first of all I'm sorry for the long post, this is a small problem but a little hard to analyze.
Actually in the link browser there are displayed both the default language records and the translated records.
I found out that, at least in my installations, if an editor picks a translated record then the generated link causes problems with the fragile Realurl 2.
Instead if the editor picks the default language records there are no problem and even the translated pages display the links to the right translated records.
By instance, these are the links that appear in EXT:news list for default and second language:
Default language:
index.php?id=44&L=0&tx_news_pi1%5Bnews%5D=100181&tx_news_pi1%5Bcontroller%5D=News&tx_news_pi1%5Baction%5D=detail&cHash=6c102a4644eba9390869bb79afd60104
Second language:
index.php?id=44&L=1&tx_news_pi1%5Bnews%5D=100181&tx_news_pi1%5Bcontroller%5D=News&tx_news_pi1%5Baction%5D=detail&cHash=6c102a4644eba9390869bb79afd60104
Everything is ok and the only thing that changes is the L parameter.
Now, if we use instead the link browser and we pick the second language record the link becomes:
index.php?id=44&L=1&tx_news_pi1%5Bnews%5D=100182&tx_news_pi1%5Bcontroller%5D=News&tx_news_pi1%5Baction%5D=detail&cHash=68d9bb161c64e5bc17baf08180d21202
Here what changed are the parameters: L; news uid; cHash.
For Realurl 2 obviously it is a different url even if it display the correct content.
The real problem is that at the end we have 2 different urls with the same content, bad for SEO.
I tried to find a way to display only the default language record in the link browser but I'm unable to find a viable solution.
The problem could be easily solved if there was a way to set to false
$this->localizationView
ofDatabaseRecordList
so only the default language records would be displayed in the link browser but I can't find a way to set it without hacking the core.One ugly solution could be to temporary store
$GLOBALS['TCA'][$table]['ctrl']['languageField']
and then unset it before callingDatabaseRecordList->getTable()
. But this need also to usegetTable
hook to change the where clause.Please, do you have any other idea?
The text was updated successfully, but these errors were encountered: