Welcome, Guest
Username: Password: Remember me
  • Page:
  • 1

TOPIC:

Migrating to 3.0 - Redirect Loop SEF Front-end 23 Mar 2013 08:49 #6998

Hi all,

I have generated a component for testing with Cook and am now migrating it to work on Joomla 3.0. Back-end went fairly smoothly, but seem to have an issue with SEF and the front-end when I am accessing the component via a menu (or any SEF link really).

So for example when I do this:
www.mydomain.com/index.php?option=my_component&view=myview

It works fine.

But this:
www.mydomain.com/componentname/myview

results in a infinite redirect loop.

I have been checking the router.php generated by Cook and it seems to endlessly call the buildRoute.

This is the code of the buildRoute:
function WpfBuildRoute(&$query) {

    logThis("Building Route\n");
    logThis("Query:\n");
    foreach ($query as $field=>$value) {
        logThis($field.'=>'.$value."\n");
    }
    logThis("\n");

    $segments = array();
    if (isset($query['view'])) {
        logThis("We have a view {$query['view']}\n");
        $view = $query['view'];
        $segments[] = $view;
        unset($query['view']);
    }

    if (isset($query['layout'])) {
        logThis("We have a layout {$query['layout']}\n");
        $segments[] = $query['layout'];
        unset($query['layout']);
    }


    if (isset($query['id'])) {
        if (in_array($view, array('country', 'editcountry', 'projectstatus', 'editprojectstatus', 'projecttype', 'editprojecttype', 'service', 'editservice', 'sector', 'editsector', 'client', 'editclient', 'clientsector', 'editclientsector', 'project', 'editproject', 'screenshot', 'editscreenshot', 'serviceapplied', 'editserviceapplied'))) {
            $segments[] = (is_array($query['id']) ? implode(',', $query['id']) : $query['id']);
            unset($query['id']);
        }
    };

    logThis("Segments:\n");
    foreach ($segments as $field=>$value) {
        logThis($field.'=>'.$value."\n");
    }
    logThis("\n\n");
    return $segments;
}

Anybody had this issue as well and/or know how to fix it?

Kind regards,

Misha

Please Log in or Create an account to join the conversation.

Re: Migrating to 3.0 - Redirect Loop SEF Front-end 23 Mar 2013 09:12 #7000

Reposted this to 'Coding inside your component' as this one is in the wrong category

Please Log in or Create an account to join the conversation.

  • Page:
  • 1
Time to create page: 0.072 seconds

Awards for the best Joomla app. This product is gonna win an award for this amazing job. Cook Self Service is the the best application from all over the Joomla universe ! It brings Joomla to a professional level really advanced for developers. It is a real fun to develop with it. The ACL part and security checks implementation are just... so much hours saved. I can now concentrate myself more on the design part and the creative works. Thank you so much. Guys I offer you all my congratulation ! Keep up the works because Joomla is needing it to increase the quality of extensions availables on the JED. I also learned a lot because I can see how to code at the proper place and I found all my answers reading the forum.
lack_hanson (JED)
          

Get Started