Critical Bug: url redirects do not work - Forum | JoomShaper
Solved SP Page Builder

Critical Bug: url redirects do not work

Asked by Martin 3 months ago Last activity 2 months ago

After updating to SP Page Builder 6.6.2, some of our redirects do not work anymore. Instead of redirecting, it gives and error: "You don't have permission to access this. Please contact a website administrator if this is incorrect."

This is not a permission error as all the items have access Public and they were working before the update.

Our redirects are simple Joomla articles, but it seems that the SP Page Builder router is doing something that it shouldn't.

This is the call stack:

0
A key is required
Call Stack

Function Location

1 () JROOT/libraries/vendor/joomla/database/src/DatabaseQuery.php:1910
2 Joomla\Database\DatabaseQuery->bind() JROOT/libraries/vendor/joomla/database/src/DatabaseQuery.php:2008
3 Joomla\Database\DatabaseQuery->bindArray() JROOT/libraries/vendor/joomla/database/src/DatabaseQuery.php:1796
4 Joomla\Database\DatabaseQuery->whereIn() JROOT/components/comsppagebuilder/router.php:356
5 SppagebuilderRouterBase::getSlugsByCollectionItemIds() JROOT/components/comsppagebuilder/router.php:114
6 SppagebuilderRouterBase::buildRoute() JROOT/components/comsppagebuilder/router.php:590*

Please check this as soon as possible!

Thanks,
Martin

Accepted answer

Marked as the solution
Toufiq Senior Staff

You are most welcome! We appreciate your feedback and are delighted to hear that you're satisfied with our service.

To officially close this forum post, mark it as accepted. If you have any more questions or need further assistance in the future, please don't hesitate to reach out to us.

As for writing a review about our product and support quality, we would greatly appreciate it! Your feedback helps us improve and serves as a valuable reference for others. Please take a moment to share your thoughts about your experience with our product and the support you received. Your input is valuable to us and the community. Thank you in advance for your time and support.

Joomla Extension Directory

JED.png

TrustPilot

Trust-Pilot.png

We're here to assist you with any further questions or requests you may have. Once again, thank you for choosing our product and for being a part of our community.

Best regards,

Toufiqur Rahman

Team Lead, Tech Support (JoomShaper)

17 more replies

Toufiq Senior Staff

Hi there,

Thank you for reaching out, and I apologize for any inconvenience caused by this oversight. To better address the issue, could you kindly provide Joomla administrator access? This will enable me to thoroughly investigate the matter and provide you with a prompt resolution.

Note: Also, Share an screencast video about the full scenario.

Best regards,

Toufiqur Rahman (Team Lead, Support)

Martin Asked this

Hi,

I have added the sample test site credentials in the hidden content.

Toufiq Senior Staff

Please share an screencast video. Thanks

Martin Asked this

Link to the screencast added in hidden content.

Toufiq Senior Staff

Please check the screenshot.

Martin Asked this

Thanks, but that is why we are using the Joomla built-in redirects, so the old not working url will redirect to the new working URL.

It has always worked for hundreds of our sites and thousands of links and that is the way the Joomla redirects are used. And this particular redirect was working perfectly fine on this site before updating to the latest SP Page Builder.

Toufiq Senior Staff

Will you please check now. Thanks

Martin Asked this

It was 6.2.2 before.

Toufiq Senior Staff
3 months ago · edited

Current version is 6.2.2

I have checked 6.2.1 version and same issue.

Martin Asked this

Stange, I cannot explain that as when we discovered the issue, I especially checked my localhost copy on 6.2.2 and it was working. Then I updated to latest version to check if it is the SP Page Builder issue and after update the localhost site immedeatly had the same issue.

Anyway, this fix is really critical to us.

Martin Asked this

It seems that the Collections are stealing the article urls. When I do this is components/com_sppagebuilder/router.php, it starts working again:

private static function getArticleIdBySlug($slug){
    return null; // PATCH: don't treat Joomla articles as SPPB dynamic items.

    /*$db = Factory::getDbo();
    $query = $db->getQuery(true)
        ->select('id')
        ->from('#__content')
        ->where('state = 1')
        ->where('alias = ' . $db->quote($slug));
    $db->setQuery($query);
    $articleId = $db->loadResult();

    if ($articleId) {
        return $articleId;
    }

    $query = $db->getQuery(true)
        ->select('id, title')
        ->from('#__content')
        ->where('state = 1');
    $db->setQuery($query);
    $articles = $db->loadObjectList();

    foreach ($articles as $article) {
        if (OutputFilter::stringURLSafe($article->title ?? '') === $slug) {
            return $article->id;
        }
    }

    return null;*/
}
Martin Asked this
3 months ago · edited

Please see my urgent request in hidden content (post #226190)!

Log in to reply.