For the past week I have been "cleaning up" my new site since everything seemed to be working pretty well. One thing I did was move the PHP code snippets from every Auto Action into individual files that I include instead of having the code in the Auto Action action box directly. Well, this caused an interesting problem I've been scratching my head over for almost an entire week.
First, all my include files have the customary <?php ?> tags in them. I do this for a reason; so that I know I am editing a PHP source file. However, I suspect (have not confirmed) that if these tags are in the file that somehow CB substitution doesn't work on the included code. Why do I suspect that? Because I geocode every address entered during registration using Google Maps API. The string I pass to it is formed like "[cb_street]+[cb_city]+[cb_state]+[cb_zip]". This had been working for 2 months when the very small code snippet was in the Auto Actions box. But once I moved it to an include file (with those php tags), it geocoded every single address as "26 Strathmoor Dr, Sherwood Park, AB T8H 2B6, Canada". This is the result you get when you geocode that string without the field substitutions. Give it a try and see for yourself.
I did not put two and two together for almost a week, convinced that somehow something was intercepting the SSL queries I was doing.
So the question is, should these include files not have the php tags? Is that what causes this? Should the files just contain bare PHP code without these context tags? Curious minds want to know!
Bruce
Bruce S - Vienna, VA