• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
HMVC (wiredesignz) bug - CI 2.0

#1
[eluser]crnalajna[/eluser]
There is a bug in a /MX/Router.php witch produce redirect to 404 page when default_controller not found in /controllers folder.
Variable $config['uri_protocol'] is set to "AUTO" or to "REQUEST_URI", otherwise it working fine.
That has something to do with new URL protocol auto detection.

How to reproduce:
1. clean CI (from bitbucket)
2. HMVC (https://bitbucket.org/wiredesignz/codeig...sions-hmvc)
3. move /controllers/welcome.php to /modules/welcome/controllers/
4. move /views/welcome_message.php to same modules folder /modules/welcome/...

Call: http://your_url.dev (you'll get 404)
But if you call: http://your_url.dev/index.php/welcome everything will be fine.


my correction...
/third_party/MX/Router.php
Code:
public function _validate_request($segments) {

        /*  correction */
        if (count($segments) == 0)
        {
            return $segments;
        }
        /*  end correction */


        /* locate module controller */
        if ($located = $this->locate($segments)) return $located;

        /* use a default 404_override controller */
        if (isset($this->routes['404_override']) AND $segments = explode('/', $this->routes['404_override'])) {
            if ($located = $this->locate($segments)) return $located;
        }

        /* no controller found */
        show_404();
    }


Messages In This Thread
HMVC (wiredesignz) bug - CI 2.0 - by El Forum - 02-11-2011, 07:59 PM
HMVC (wiredesignz) bug - CI 2.0 - by El Forum - 02-12-2011, 04:48 PM
HMVC (wiredesignz) bug - CI 2.0 - by El Forum - 02-12-2011, 05:11 PM
HMVC (wiredesignz) bug - CI 2.0 - by El Forum - 02-13-2011, 03:54 AM
HMVC (wiredesignz) bug - CI 2.0 - by El Forum - 02-13-2011, 04:53 AM
HMVC (wiredesignz) bug - CI 2.0 - by El Forum - 02-14-2011, 09:28 AM
HMVC (wiredesignz) bug - CI 2.0 - by El Forum - 02-14-2011, 09:41 AM
HMVC (wiredesignz) bug - CI 2.0 - by El Forum - 02-14-2011, 09:46 AM

Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2021 MyBB Group.