Single page fails depending on path

Permalink
I'm setting up a single page on a Concrete5 site using the MVC model that fails depending on the URL it is installed in.

If it is in the URL "mysite.com/new" it works as expected with both the controller.php and view.php running and generating the correct content. If it is in the URL "mysite.com/old" only the controller code is run and the view.php does not appear to be called at all. The controller names are correct for each (NewController and OldController) so this should not be the problem. The view.php files are identical and placed in the correct single_page folders (old/view.php and new/view.php).

Previously there was a regular Concrete5 page at "mysite.com/old" which I deleted before setting up the single page. I deleted this using the Dashboard and do not see it on the list of pages anymore. I've also tried deleting the single page at "mysite.com/old" and regenerating it, refreshing it, turning off all caching, clearing the cache, and it still does not work. Could the old C5 page still be in the database and preventing correct name resolution to the single page? Or does anyone have another idea why this would happen?

Thanks!

 
ronyDdeveloper replied on at Permalink Reply
ronyDdeveloper
Did you check your trash on dashboard? Go to dashboard -> Sitemap And choose "Show System Pages". You will be able to see the trash there. Just click on it and empty trash. Then refresh the single page from the dashboard below path:
http://www.domain.com/index.php/dashboard/pages/single/...

Hope this helps.

Rony
geodynamics replied on at Permalink Reply
Thanks for the suggestion Rony. I tried it but I still have the same problem.
geodynamics replied on at Permalink Reply
To give further details to anyone interested:

I tried removing the entire view/controller concept from the equation, and just created a php script called old.php which prints a single word. I can add this as a single page, but it does not print anything when I visit the page. The same script works fine as a single page with the name new.php. Looking at the C5 database I do not see any old.php related entries in the Pages table besides the single page I create. If anyone has any other ideas, please let me know.

Thanks!
geodynamics replied on at Permalink Best Answer Reply
For anyone who also experiences this, I believe I found the solution. The problem was that there was also an old.php in the template folder. For some reason the single page setup would use template/old.php rather than single_pages/old.php.

What made this even more confusing is that my original setup was with MVC. This means C5 was actually choosing template/old.php rather than single_pages/old/view.php even though it was also using controllers/old/controller.php. I'm guessing this has to do with the search order of include files, but it may be worth fixing in future versions of C5.