-
- 7 Posts
I seem to have run into a bug in YAMS 1.1.7 alpha RC7 where putting a dollar sign ($) in front of one or two digits causes them to disappear when the page is rendered. For example, ’$1,000’ turns into just ’,000’ and ’$10’ turns into ’’. Using the HTML Entity $ fixes it, but unfortunately, I need the dollar sign to work for the sake of the client. A quick Google search revealed a similar bug with AjaxSearch that was fixed by escaping a search string before passing it to preg_replace.
I’ve dug around in the YAMS source for a bit, but I haven’t really made much headway. Has anyone else run into this issue? It happens on both multilingual and monolingual template pages. If I disable the YAMS plugin, everything works fine again. I’m not using PHx and YAMS is first in line for all of its plugin events.
Thanks in advance!
-
- 805 Posts
Hi there. I can confirm that problem. I must have forgotten to apply preg_quote to part of a string passed to preg_replace. I’ll fix it as soon as possible and get back to you when it’s done.
-
- 805 Posts
Yes. I fell into the
same trap as AjaxSearch. I forgot to escape the replacement value in a preg_replace. However, I fixed the problem using what I believe to be a
better method.
I’ve just put together a new release of YAMS ( YAMS 1.1.8 ) that contains the patch. See my forum signature for a link. I haven’t yet submitted it to the MODx repository, but I’ll do so soon. EDIT: Just submitted, but it normally takes a while to be approved.
Just installed this for the first time; will upgrade before I get too far along. Still a lot to learn!