Hi Emily,
Is MIGX used on the home page (ID=1)? I would check, if MIGX is working or not. Can you comment it out?
Without knowing any further details, it was just what came up my mind.
Fabian
Thanks Fabian, To be fair it actually looks like the template file has become completely corrupted or is causing some massive problem. If i take a copy of the template and remove everything from in it, any page using that template will still display a blank page (500 Server Error). If i create a new template though and copy the content of the corrupted template to it then it works fine...... can a template become corrupted like that?
The simple thing would be to re-assign a new template to my resource, but as i am unable to get in and edit that resource i have no idea how to do that without creating a new resource. As the page in question is the home page it would mean updating an awful lot of references throughout the site and i don't want to do that.
Any suggestions on how to update a page template when you can't get into that page? OR how to fix a corrupt page template?
-
☆ A M B ☆
- 24,524 Posts
Yes, I've had that happen before. I had to duplicate the template, assign the resources to the new template, then I could delete the bad template. Actually it also involved a corrupted TV - although I'm not sure exactly which was corrupted, the template or the TV. I used the Batcher extra to shift the resources to the new template.
Thanks Susan - that was what i thought i was going to have to do.......the page is the home page though (ID 1) and i didn't really want to change that - the default/home page is referenced in a lot of places and it would involve updating a lot of references. Is there anyway of manually changing the ID of a resource do you know, so that i could still have the home page as ID=1?
-
☆ A M B ☆
- 24,524 Posts
You can, in this case, go to the database and manually change the resource ID of the new one to 1. Generally this is most definitely not recommended, since the ID is used in all sorts of ways and should be left alone. But in this case, the original resource #1 is deleted, and you need a resource #1 if you're not going to make a lot of tedious changes to configuration settings and other uses of that #1. Likewise the template, if you delete the original and create a new one, you can change its ID to the one you deleted. That way you don't need to change the template assignment of any resources, they'll be getting the template with the same ID.
Thanks Susan, with further investigation it would appear that the problem is two of the TVs assigned to the template - if they are both assigned to the template then the problem occurs, if either of them isn't then the problem doesn't occur - why they work on their own though i don't know, i would have thought they either cause the problem or they don't, but they obviously cause the problem when assigned together. I have tried creating new TVs exactly the same (not duplicating), but the same problem still occurs so again i am a little stumped as to what the problem is - one is a resource list TV which is used to link the user to that specific page and the other is an image TV. Ever come across something similar?
I would first try repairing all tables in the DB in PhpMyAdmin.
FYI, It shouldn't matter what the ID of the home page is. All links to the home page should be in this form:
<a href="[[~[[++site_start]]]]">Link text</a>
It's possible that it's not the template itself but the template field of the resource pointing to a non-existent template, though what it looks most like is that a MIGX plugin is throwing an E_NOTICE error.
If that's it, Disabling the plugin and deleting all files in the core/cache directory would make it go away.
Infact, if i change the image TV type to something else, i.e. Text, then it all works again!!!
That's definitely a weird problem. I missed the part of your OP about the error not happening at the same time as the issue.
Try doing a "view source" on the page with each TV alone and see if there's anything odd about the HTML being produced by the TV (like a missing closing quote or > ).
If you don't see anything, you could try running the page, with each TV working alone, though the validator at:
http://validator.w3.org/. If both are valid, try running the page with both TVs.