Results 1 to 6 of 6

Thread: Articles not show on ROOT

  1. #1
    New user
    Join Date
    08-17-11.
    Location
    The Netherlands
    Posts
    9

    Default Articles not show on ROOT

    I started creating a site on Contao 2.9.5. I place an article on the first page (let´s call this page Home).
    When browsing to to site (http://www.domain.com) the article is shown.

    Site ROOT (www.domain.com)
    --- Home
    --- Page 2
    --- Page 3

    Now I upgraded to Contao 2.10.0. At this point when Browsing to http://www.domain.com the article is not there any more. Only after browsing to http://www.domain.com/index.php/home.html the article is shown again.

    Why are articles not shown anymore when browsing to the sites ROOT. What am I doing wrong?

  2. #2
    User
    Join Date
    06-19-09.
    Posts
    417

    Default Re: Articles not show on ROOT

    Without looking at the actual site, my 1st guess would be that there is a redirection issue maybe related to the .htaccess file.

  3. #3
    New user
    Join Date
    08-17-11.
    Location
    The Netherlands
    Posts
    9

    Default Re: Articles not show on ROOT

    Gary,

    thanks for the quick reply.

    I cannot show you the site at this moment, because it´s still on my local server. So not available online.
    You quess a relationship with the .htaccess file... You mean the .htaccess in the root of Contao?

    As far as I know I´m not using any redirection locally....

    Regards

  4. #4
    Experienced user
    Join Date
    08-21-09.
    Posts
    563

    Default Re: Articles not show on ROOT

    Hey,

    Not necessarily redirection that you set up -- the system does redirection as well. That's why normally you could go to /home.html even though there isn't really a physical file there.

    I agree with Gary based on what you're describing -- something with the .htaccess file is the first place I'd look too.

    I'd try backing up your existing file, and then dropping in the default one that ships with Contao 2.10. If I remember correctly it's named something like "htaccess.txt" and needs to be renamed to work.

    After that, I'd also doublecheck your settings in the backend and make sure rewrite URLs is still turned on.
    Brian

  5. #5
    New user
    Join Date
    08-17-11.
    Location
    The Netherlands
    Posts
    9

    Default Re: Articles not show on ROOT

    Okay... I´ve tested this too on a clean installation of Contao 2.10.
    Nothing is changed after the installation.

    Just created a website ROOT and a Home page named Home.

    ROOT (http://localhost:8080)
    --- Home
    --- Page 2

    Now I can create an article on the Home page.

    Browsing to http://localhost:8080 gives an empty page.
    Browsing to http://localhost:8080/index.php/home.html give a page with the article.

    I´ve changed the RewriteBase to / in the .htaccess file and checked "Rewrite URLs" in the backend. This works fine to remove the /index.php from the URL.

    Did some more research by logging some custom debug information in the files "index.php", "PageRoot.php", "PageRegulare.php" and "Controller.php".

    The page is created in the following order: header -> right -> main -> footer.

    While creating the header modules everything is working normal. At all times $objPage->id is set to "2" (1 = Root, 2 = Home, 3 = Page 2).

    Then while creating the modules for all the other sections I found that before the call to the function getFrontendModule (PageRegular.php) the $objPage->id is set to "2". In the function getFrontendModule (Controller.php) $objPage->id is NULL and after the declaration global $objPage; $objPage->id equals 1 (Root page)

    Not sure why this pageID is changing during generation...

  6. #6
    New user
    Join Date
    08-17-11.
    Location
    The Netherlands
    Posts
    9

    Default Re: Articles not show on ROOT

    Problem solved...

    I use a custom extention create by the former developer of the site...

    He refilled the $objPage object by the current page.
    I´ve changed the code (about 50 lines) to just 1 line of code and articles are shown again on the ROOT...

    Thanks all for the help.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •