Invision Community 4: SEO, prepare for v5 and dormant account notifications By Matt Monday at 02:04 PM
Gabriel Torres Posted January 5, 2022 Posted January 5, 2022 Hello, Here in our install we found the following issue. Because the source code adds the ?d= parameter in $table->baseUrl, navigation links also have this parameter. For example, for our https://www.clubedohardware.com.br/noticias/armazenamento/ page, the default navigation becomes https://www.clubedohardware.com.br/noticias/armazenamento/page/2/?d=6, https://www.clubedohardware.com.br/noticias/armazenamento/page/3/?d=6 and so on, instead of just https://www.clubedohardware.com.br/noticias/armazenamento/page/2/, https://www.clubedohardware.com.br/noticias/armazenamento/page/3/ etcetera. To fix this, I had to edit /applications/cms/modules/front/database/category.php and remove the following line: $table->baseUrl = $table->baseUrl->setQueryString( 'd', \IPS\cms\Databases\Dispatcher::i()->databaseId ); I know we have a very customized Pages configuration here, but I am giving you a heads up to check whether this line should really exist. Cheers! SeNioR- 1
Marc Posted January 5, 2022 Posted January 5, 2022 Ive flagged this for our developers so they can confirm SeNioR- and Gabriel Torres 1 1
Adriano Faria Posted January 5, 2022 Posted January 5, 2022 11 hours ago, Gabriel Torres said: Hello, Here in our install we found the following issue. Because the source code adds the ?d= parameter in $table->baseUrl, navigation links also have this parameter. For example, for our https://www.clubedohardware.com.br/noticias/armazenamento/ page, the default navigation becomes https://www.clubedohardware.com.br/noticias/armazenamento/page/2/?d=6, https://www.clubedohardware.com.br/noticias/armazenamento/page/3/?d=6 and so on, instead of just https://www.clubedohardware.com.br/noticias/armazenamento/page/2/, https://www.clubedohardware.com.br/noticias/armazenamento/page/3/ etcetera. To fix this, I had to edit /applications/cms/modules/front/database/category.php and remove the following line: $table->baseUrl = $table->baseUrl->setQueryString( 'd', \IPS\cms\Databases\Dispatcher::i()->databaseId ); I know we have a very customized Pages configuration here, but I am giving you a heads up to check whether this line should really exist. Cheers! This is used to load the form when the database isn't set on a page, @Gabriel Torres: /** * Show the pre add record form. This is used when no category is set. * * @return void */ protected function form() { ... } else if ( \IPS\cms\Pages\Page::$currentPage === NULL and \IPS\cms\Databases\Dispatcher::i()->databaseId === NULL and isset( \IPS\Request::i()->d ) ) { \IPS\cms\Pages\Page::$currentPage = \IPS\cms\Pages\Page::loadByDatabaseId( \IPS\Request::i()->d ); } SeNioR- and Gabriel Torres 1 1
Gabriel Torres Posted January 5, 2022 Author Posted January 5, 2022 (edited) @Adriano Faria @Marc Stridgen My suggestion then is for the source code to check whether the database is set or not and add the ?d= parameter only if the database isn't set. Because the navigation URL looks ugly, we are exposing the database ID, and this may also influence SEO. Edited January 19, 2022 by Gabriel Torres
Marc Posted January 18, 2022 Posted January 18, 2022 On 1/5/2022 at 1:18 PM, Gabriel Torres said: @Adriano Faria @Marc Stridgen My suggestion then is for the source code to check wether the database is set or not and add the ?d= parameter only if the database isn't set. Because the navigation URL looks ugly, we are exposing the database ID, and this may also influence SEO. Sorry, Ive just seen this. You would need to post up within our suggestions area if you are looking for a change to be added to the platform there
Gabriel Torres Posted January 19, 2022 Author Posted January 19, 2022 @Marc Stridgen Can you please move this topic to the Suggestions forum? Thanks.
Recommended Posts