HMVC (wiredesignz) bug - CI 2.0 |
[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) {
[eluser]wiredesignz[/eluser]
Not all servers reproduce the same values for URI Protocol, this is why CI allows for a few different protocol methods. Find a URI protocol that works for you, rather than altering code.
[eluser]crnalajna[/eluser]
That part of code is just copied from original Router.php _validate_request function which working just fine w/o your lib, and with uri protocol set to auto. btw I'm using xampp
[eluser]wiredesignz[/eluser]
I have never been made aware of a problem like this before and I cannot reproduce your problem? I cannot get any test application I have here to call the _validate_request() method with an empty $segments array. Calling the domain by itself causes the method to be called with the default controller value.
[eluser]crnalajna[/eluser]
I believe I didn't had problems with older CI (2.0) versions. This happening with latest HMVC lib and CI from Bitbucket. I would like to see is there somebody else who can confirm that. wiredesignz, thank you for your time
[eluser]LeeNug[/eluser]
I can confirm this issue affects both my local machine (running MAMP) and a production server. Using a completely clean install of reactor (981178ef66b5) and modular extensions (ad0cf8bd6eb9). Seems to work when I play around with the URI_protocol setting.
[eluser]crnalajna[/eluser]
Hi, Can you change-put /core/MY_Router.php and test how that work on both of your servers? Code: <?php (defined('BASEPATH')) OR exit('No direct script access allowed'); thanks
[eluser]LeeNug[/eluser]
@crnalajna That seems to have corrected the issue for me, both locally and on a production server. Thank you |
Welcome Guest, Not a member yet? Register Sign In |