Invision Community 4: SEO, prepare for v5 and dormant account notifications Matt November 11, 2024Nov 11
Posted January 5, 20223 yr 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!
January 5, 20223 yr Community Expert 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 ); }
January 5, 20223 yr Author @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, 20223 yr by Gabriel Torres
January 18, 20223 yr Community Expert @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
January 19, 20223 yr Author @Marc Stridgen Can you please move this topic to the Suggestions forum? Thanks.