Homepage not loading

edited January 2016 in Bug Reports
Hi,
I am currently migration from 1.3 to 1.3.1
I am using a custom controller as homepage set in routes.php as $route['default_controller'] = 'homepage';

Since the merging of your 13.1 release an empty page is shown as homepage, when calling page url.

Any Ideas?

Comments

  • You've probably overwritten something you shouldn't have. Usual suspects:

    ./.htaccess
    ./fuel/application/config/MY_fuel.php
    ./fuel/application/config/routes.php
  • edited 5:21AM
    Hi,
    on trial and error by single copying files and comparing with a previous working commit I found out, that after using the new Fuel_pages.php the issue occurs.

    On var_dump debugging this file I found out the added line 597 overwriting the location with the config value default_home_view causes the error. If I add homepage (which is the name of my controller) to this var it tries to find the view homepage. If I clear the parameter with '' it goes until line 645 comparing current location to default_home_view and then trying to find_by_location with this view.
  • edited 5:21AM
    If you try a simple setup with a fresh version of 1.3.1 do you still have this issue. I tested it by creating a fuel/application/controllers/homepage.php controller and setting the $route['default_controller'] = 'homepage'; and it seemed to work OK for me.
  • edited 5:21AM
    Hi,
    OK... I debugged a little more... seems to be an issue at another place. I found out, that actually the index method of my homepage controller is called.
    I am going on investigating the issue and give feedback.
  • edited 5:21AM
    OK... problem is as following:
    My homepage is determined via a controller homepage with the method index. In the index method I am loading a cms page called startseite.

    Now in Fuel_pages.php in line 598 the cms checks is_home with startseite as parameter. The is_home function in MY_url_helper does not accept any parameters... so the parameter is not changing the behaviour of the method. The method than checks the uri for being without any suffix, so it returns true and then the location in Fuel_pages is overwritten with the default_home_view.

    So everything is as stated above, only difference is, that its not the issue, that the controller is not loaded but the cms page.
  • edited 5:21AM
    So are you saying that that homepage::index method is getting called initially and within that index method you are using $this->fuel->pages-render and that is where the problem is (not that it's not hitting the controller but it's the rendering of the page)?
  • edited 5:21AM
    Yes. I first thought the other way, but a little more debugging clarified the issue.
    any idea?
  • edited 5:21AM
    I think I see the issue. I've posted a fix for this in the develop branch:
    https://github.com/daylightstudio/FUEL-CMS/commit/be271d5bfe2258426c8cd1192d6144ec92f22084
  • edited 5:21AM
    Hi,
    works for me. I will report any further issues :-)
    KR
    Habib
  • edited 5:21AM
    There was actually an issue if you don't use your own controller it would show a 404. I've pushed an additional fix for that:
    https://github.com/daylightstudio/FUEL-CMS/commit/25432d13b03afbbfba8c5ec104f0542e6c631bf5
  • edited 5:21AM
    Hi,

    seems to work.

    KR
    Habib
Sign In or Register to comment.