Fixed Canonical URL

sunnyjey

Active Member
At the moment Canonical URL generated in Fabrik Detail pages are non-SEF URL like:
Code:
<link rel="canonical" href="https:/mydomain.com/component/fabrik/details/28/1" />

Please replace lines # 109,110,111 & 112 in "components/com_fabrik/views/form/view.html.php" in official bitbucket repository with following code:
Code:
 $itemId = FabrikWorker::itemId();
            $url    = 'index.php?option=com_' . $this->package . '&view=' . $view . '&formid=' . $formId . '&rowid=' . $rowId;
            if (!empty($itemId))
            {
                $url .= '&Itemid=' . $itemId;
            }
        }
        return Route::_($url);

After this commit, it will generate SEF enabled URL
Code:
<link rel="canonical" href="https:/mydomain.com/menu-name/details/28/1" />

PS: I am getting error while trying to send pull request from bitbucket.
 
Last edited:
I will let @troester comment on the code change. As for the repository we are rethinking how this works. I plan to open a discussion thread on it for everyone to comment on.
 
Fixed also for list view.
Additionally fixed an issue with wrong canonical links if site is in a subdirectory.
 
We are in need of some funding.
More details.

Thank you.

Members online

Back
Top