Results 1 to 12 of 12

Thread: Navigation links to multiplied sublevels after upgrade

  1. #1
    New user
    Join Date
    01-10-17.
    Posts
    16

    Default Navigation links to multiplied sublevels after upgrade

    I have upgraded from 2.9.5 to 3.5.25 using Live update. It worked OK. Startpage is OK and also pages in the menu with no drop-down. But when clicking on drop-downs I get an error No layout is specified.
    I have checked all pages and there is a layout specified. But looking at the breadcrumb there are odd things. One example, the page I get linked to is beta.korskyrkan-jkpg.se/kalender/program/program/program/program instead of beta.korskyrkan-jkpg.se/kalender/program, ie there are 3 sublevels added to the adress.

    You can have a look at http://beta.korskyrkan-jkpg.se

    The navigation is made from nav_default. It is some level 1 and some some drop-downs with a second level of links.
    Any suggestion on where the error is?

    Roland

  2. #2
    User Spooky's Avatar
    Join Date
    01-03-13.
    Posts
    339

    Default

    The site is currently in maintenance mode.

  3. #3
    New user
    Join Date
    01-10-17.
    Posts
    16

    Default

    Quote Originally Posted by Spooky View Post
    The site is currently in maintenance mode.
    Sorry. Now it is activated.

  4. #4
    User Spooky's Avatar
    Join Date
    01-03-13.
    Posts
    339

    Default

    The multiple levels are caused by redirects. For instance


    The Redirect seems to be caused by Contao itself, I am not sure why this would happen though.

  5. #5
    New user
    Join Date
    01-10-17.
    Posts
    16

    Default

    Many thanks. This is probably a first step.

    The firstlevel in the dropdown meny is an empty page. In the original set up the first level is an empty page. Thats why they set up to redirect to the next page, eg kalender is empty and is redirected to /kalender/program

    I have removed the redirect and now I get the correct adress, eg kalender/program, and not the multiple sublevels, but still get an error No layout is specified. But I have specified a layout in the backend. And the layout I have choosen is referred to as located in fe_page(global) . I do not know why it says fe_page(global). I have only fe_page.xhtml. I have renamned all tpl-files manually to xhtml. Is that correct?

    And click on calender brings up the empty page. I tried to set the redirect and leaving the redirect page blank, but this gave the same error.

    Edit. I detected I have not given the root-page a Layout. But now I only get the root-page all the time. I will try further.


    Roland
    Last edited by rollanders; 03/21/2017 at 15:54.

  6. #6
    User Spooky's Avatar
    Join Date
    01-03-13.
    Posts
    339

    Default

    Quote Originally Posted by rollanders View Post
    The firstlevel in the dropdown meny is an empty page. In the original set up the first level is an empty page. Thats why they set up to redirect to the next page, eg kalender is empty and is redirected to /kalender/program
    Hm, may be the problem here is that Contao thinks, that /program is an auto_item parameter and thus generates the page "kalender" - which of course is a redirect to "kalender/program". It's an interesting problem, I'll do some testing on that.



    Quote Originally Posted by rollanders View Post
    I have removed the redirect and now I get the correct adress, eg kalender/program, and not the multiple sublevels, but still get an error No layout is specified. But I have specified a layout in the backend. And the layout I have choosen is referred to as located in fe_page(global) . I do not know why it says fe_page(global). I have only fe_page.xhtml. I have renamned all tpl-files manually to xhtml. Is that correct?
    fe_page is not the page layout. fe_page is the template that you assign within the page layout. Make sure that a page layout is selected in the website root.

    In some cases you might need to select or deselect the page layout on all pages again when upgrading from Contao 2.x so that the correct page layout is selected (or none).

  7. #7
    New user
    Join Date
    01-10-17.
    Posts
    16

    Default

    Quote Originally Posted by Spooky View Post
    Hm, may be the problem here is that Contao thinks, that /program is an auto_item parameter and thus generates the page "kalender" - which of course is a redirect to "kalender/program". It's an interesting problem, I'll do some testing on that.

    fe_page is not the page layout. fe_page is the template that you assign within the page layout. Make sure that a page layout is selected in the website root.

    In some cases you might need to select or deselect the page layout on all pages again when upgrading from Contao 2.x so that the correct page layout is selected (or none).
    Right. I choose one of three layouts and the comes from the template fe_page.
    I started to deselect - save- select again - save. Empty the cache. For the kalender meny item. I do not get the layout error but I get the same start-page all the time for all the alternatives in the menu except the empty /Kalender/-page.

  8. #8
    User Spooky's Avatar
    Join Date
    01-03-13.
    Posts
    339

    Default

    Hm, not sure what's going on on your site.

    Btw. did you update your .htaccess as well? If not, you should.

  9. #9
    New user
    Join Date
    01-10-17.
    Posts
    16

    Default

    How can I know if it is updated? It has the correct date when the update was done.
    But looking on the /beta.korskyrkan-jkpg.se/public_html/.htaccess it looked like an old version. The beta.korskyrkan-jkpg.se/public_html/.htaccess.default is completely different. I tried to replace .htaccess with the new version but the the site crashed - became not accessible.

    Roland

  10. #10
    User Spooky's Avatar
    Join Date
    01-03-13.
    Posts
    339

    Default

    Quote Originally Posted by rollanders View Post
    How can I know if it is updated? It has the correct date when the update was done.
    You always have to manually update the .htaccess. I suggest you do the following:

    1. Make a backup of your old .htaccess.
    2. Copy the .htaccess.default from the newest Contao LTS version.
    3. Rename it to .htaccess.
    4. Change these lines
      Code:
        RewriteCond %{REQUEST_FILENAME} !\.(htm|php|js|css|map|htc|png|gif|jpe?g|ico|xml|csv|txt|swf|flv|mp4|webm|ogv|mp3|ogg|oga|eot|otf|tt[cf]|woff2?|svgz?|pdf|zip|gz)$
        RewriteCond %{REQUEST_FILENAME} !-f
        RewriteRule .*\.html$ index.php [L]
      to
      Code:
        RewriteCond %{REQUEST_FILENAME} !\.(htm|php|js|css|map|htc|png|gif|jpe?g|ico|xml|csv|txt|swf|flv|mp4|webm|ogv|mp3|ogg|oga|eot|otf|tt[cf]|woff2?|svgz?|pdf|zip|gz)$
        RewriteCond %{REQUEST_FILENAME} !-f
        RewriteCond %{REQUEST_FILENAME} !-d
        RewriteRule .* index.php [L]
      since you are using no URL suffix.
    5. Add any other custom directives that you still need.

  11. #11
    New user
    Join Date
    01-10-17.
    Posts
    16

    Default

    OK

    have done that, and the site is the same. We have tinkered a bit with tho of the CSS files (\content\layout.css and \system\contao.css) to get a better view in mobiles. I can find the layout.css and replaced that with the original but it did not help. I cannot find the contao.css

    May this be an explanation?

  12. #12
    User Andreas's Avatar
    Join Date
    07-11-09.
    Location
    Mönchengladbach
    Posts
    499

    Default

    I also have partially answered your same question in german forum. https://community.contao.org/de/show...-multipliziert
    Web-Development, Freelancer, Burgtech, XHTML, HTML5, CSS, PHP, Javascript, MooTools, MySQL and more
    Amazon wishlist

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
  •