New Page Replaces 'Home' in Structure - Weird Behaviour

  • Ok, this is an odd one.


    I have a site running Perch Runway. I go to add a new 'top level' page, based on a template in perch>templates>pages. When I add the page the existing 'Home' page becomes a child of nothing, preventing the website from loading. The new page ('Stripe Intent' on the screenshot) is saved, but appears to have sub-pages, even though it doesn't. When being shown the confirmation message after creating the page, the actual 'Page Details' being displayed are for the Home page, not the new page.


    Anyone seen anything like this before? I've built loads of sites in Runway and never seen it do this - bizarre issue with the database?



    Other symptoms are that it takes about 40s to load the home page and there are ? symbols appearing the data (instead of £ signs etc) shown by <perch:showall /> on various templates (particularly things like the cart).


  • Here's the debug code from the bottom of the page showing the queries being used to create the page (I commented out the redirect in perch>core>apps>content>modes>page.add.pre.php so I could see this). Not sure if it shows anything helpful.

  • Fixed!


    I compated the database table structure (perch2_pages) to another Perch Runway site and there were a few differences:

    • No Primary field assigned
    • No index on parentPageID
    • No auto increment on pageID

    I've no idea how these differences occured, but after manually updating the broken table everything's working OK again.