Module routing problem with v1.3

edited June 2015 in Modules
Hi

I seem to have a pretty major routing issue with Fuel v1.3 and my CKF_Assets module [https://github.com/croaker000/ckf_assets]. It's a CKFinder replacement for Fuel Assets. To get the override, I have a module route set up:
$route[FUEL_ROUTE.'assets/select/(:any)'] = 'ckf_assets/ckf_selector/select/$1';

It works perfectly in v1.2 but in v1.3, when I try to browse for an image within CKEditor, I get a blank popup CKFinder window.

Firebug complains about various CKFinder components being missing (error 404) eg.
".fuel/assets/select/core/connector/php/connector.php?command=Init"

The file is actually in ./fuel/modules/ckf_assets/assets/js/core/connector/php/connector.php

There's some other stuff like config.js and the CSS which gets missing too.

Since it's working fine in v1.2, I'm pretty sure it's not a CKFinder problem despite it being the ckfinder.js that looks for connector.php. I've tried forcing the CKFinder base path in the popup() call to no avail.

I tried getting around the problem by adding another module route
$route[FUEL_ROUTE.'assets/select/core/(:any)'] = FUEL_FOLDER.'/modules/ckf_assets/assets/js/core/$1';
and by debugging the Fuel Router.php, I get this in the logs
Router Log: Client sent : fuel/assets/select/core/connector/php/connector.php Router Log: regex Route found : fuel/assets/select/core/(:any) --> fuel/modules/ckf_assets/assets/js/core/$1 Router Log: regex Redirecting to : fuel/assets/select/core/connector/php/connector.php --> fuel/modules/ckf_assets/assets/js/core/connector/php/connector.php
Despite what looks to be a correct route, I still get the 404.

Any ideas what may have changed in Fuel 1.3 that might cause the inital problem or maybe why my new route is ignored?

TIA.

Cheers

Comments

  • edited 2:44AM
    Is the main page a blank page or a 404 error page? If it's a blank page and you are getting 404 errors on certain CKFinder assets, then it sounds like the route is probably working and there are issues with some of the asset files loading within that page (like the CSS and JS)... does that sound correct?
  • edited 2:44AM
    Yes, it's a proper 404.

    And yes, the problem is with the supporting assets in that the core of the module works (the native Fuel assets selector that pops up from CKEditor is replaced by mine and my code takes over popping up the CKFinder window, it's from then on though that it fails to load the supporting CSS, connector.php (XML output) and JS.

    From the routes debugging above, if I enter the transformed routes directly into the browser, they work as expected.
  • edited 2:44AM
    So it sounds like it is getting to the CKFinder window OK, but the page isn't displaying due to 404 errors in the asset (CSS and JS) that it's trying to load. What are the 404 error paths to the assets? You mentioned that firebug was giving you the following:
    .fuel/assets/select/core/connector/php/connector.php?command=Init
    Are there relative paths or something in that connector.php file?
  • edited June 2015
    I can't get into ckfinder.js to see but I suspect they're relative. The apache log shows
    http://{server}/fuel/assets/select/core/connector/php/connector.php?command=Init on each request

    Is v1.3 routing different to v1.2? ./modules/core/Router.php seems to be the same :(
  • edited 2:44AM
    I can't think of anything in 1.3 that would have caused this change. If you have the module folder in a zip and want me to test it out please send it to me along with any additional install instructions (if you click on my name it will give you that address).
  • edited 2:44AM
    Email sent. Thanks.
  • edited 2:44AM
    Can you see the problem? Do you need anything else from me? I'm working on the problem at my end but haven't made any progress :( Cheers.
  • edited 2:44AM
    I'm sorry but I don't see anything in my inbox or SPAM folder from your email address.
  • edited June 2015
    I've resent via a different route, hopefully this time it'll work...

    (both attempts were from email addresses other than the one on my forum account)
Sign In or Register to comment.