How to remove unwanted code


(Andrew Rodger) #1

Hi. I am stuck in a corner into which I seem to have painted myself. People have been very helpful in giving advice and valuable time, not least, as ever, Will Woodgate who is very patient with my lack of expertise. To try to make a long story short, I am running a web site for a local charitable organisation and one of the requirements for the site is a secure means of getting in touch i.e. a contact form. Our host preference of many years, for a quiet life and competitive fees, do not support php and sql etc. So we were stuck for a bit and I set up a work round using Doobox’s Obscure Email stack. It worked but was not what they wanted. So when I heard about the Formulate stack from Stacks4Stacks I decided that this was going to be a better solution and to prepare for the change I did the following: I went to the Contacts page in RW8 and removed the Obscure Email stack from the page. I deleted the page and created another one called Get In Touch. I then changed the theme and used the opportunity to completely overhaul the site. I then added the Formulate stack to the GIT page and set it up to operate with Formspree. All seemed to work but none of the test email attempts worked, they each generated an error dialogue. After much reading around the subject, asking Will and asking Formspree it boiled down to one line of code sitting at line 6 which is: see attachment.08

Will did not put it there in the theme or the stack so I can only assume it is something to do with the Obscure Email stack which has somehow propagated itself, despite the steps I took. I can download the index.html file from the host, delete the line and upload it again to overwrite the faulty file but I cannot bear to have to do this every single time I make an alteration to the site which happens daily. So here is my question… Is there ANY way I can edit the RW8 file to get rid of this faulty code? It seems a little odd that we can read code, inject code but not edit. If there is no way to do so, can anyone please suggest an optional strategy which does not involve starting from scratch? I would be very grateful for any help I can get. Thanks.


(Andrew Rodger) #2

I should perhaps add that I have completely removed the Obscure Email stack from RW8.


(Stuart Marshall) #3

There’s a ‘Protect email address’ option in the Advanced project settings in RW8. Maybe try unchecking that to see if it’s that that is generating the code.


(NeilUK) #4

Try unchecking “Anonymise requests to third party servers” under “Privacy” if it’s currently checked.


(Andrew Rodger) #5

Thank you both. I unchecked both and it works fine. Phew! So pleased not to have a huge rebuild to do. Really appreciate it chaps. I would also add that Giovanni at Formspree was a tremendous help and I recommend using Formulate and Formspree if you are stuck without php for any reason. Drew