October 24, 2013 at 9:59 am #68643
I realise that this is a common question/issue and I have searched through previous posts but I haven’t found an appropriate answer.
I always make a backup copy of the original file just incase but this doesn’t solve it either, this is why I am confused. Say I paste a code snippet in the wrong place, realise I have made this mistake and then either put it back exactly as it was before OR even replace the whole page with the original backup code, it then crashes the whole site and flags up a ‘Parse Error’ with a specific line number, which I have tried looking at but to no success, meaning I have to delete the whole database and start again!
I can understand a simple mistake in the coding to cause this but how is this happening if I’m putting it back exactly as it was before??? it just doen’t make any sense! :/
Hope someone can shed some light on this, as atm I’m too scared to create too much content in the case of loosing all my hard work!
SteveOctober 24, 2013 at 12:17 pm #68668
SummerParticipantPost count: 1123October 24, 2013 at 2:23 pm #68685
Sorry I meant to state that in my original question but forgot to add! No I’m simply using the ‘editor’ interface within the wordpress dashboard, so if I’ve added or moved something wrong there, then I just either repaste or delete as appropriate, to get it back to it’s original state. I can’t see how this is flashing up an error, I’m sure I’ve done this in the past numerous times with no issues? I’m literally putting back in exactly the same way!
Thanks for your help,
SteveOctober 24, 2013 at 3:04 pm #68698
SummerParticipantPost count: 1123
That’s the problem. When you’re using the WP editor to edit the functions.php, once you have an error in there, it will not refresh, cannot refresh, so technically, it thinks you still have the code with the error.
If you go to your hosting control panel, and edit the file there, or use FTP and download the file, you’ll see that it has not in fact been updated since that first time when you got the PHP error.
So the WP editor is in fact faking you out
It seems to still work for errors in other templates, just not functions.php
October 24, 2013 at 4:13 pm #68717
Ahhhh that now makes sense thank you so much.. I thought I was loosing the plot (well more than I already have :P)
I will edit this outside of the dashboard from now on!
Thanks for your help,
You must be logged in to reply to this topic.