Need extra help with your Joomla site? Consider paid Joomla support by the developer of Chameleon and MetaMod.
Find and Replace Error
Re: Find and Replace Error
Hi mhogan,
I am intrigued... that's very odd behaviour!
Can you please tell me:
1. what version of Chameleon you are using
2. what version of Joomla you are using
3. what settings you are using for the find and replace? (I assume this is in a Succeed or Fail action).
e.g. what are you putting for "find", "replace" and for case sensitive/insensitive/regex, and <head> and/or <body>.
If it's getting rid of strings in the page that start with "$" then that could be a regex problem on your side if you are using regexes, or in Chameleon itself which I can check on. But I need to know the details above first, for testing.
Thanks,
Stephen
Re: Find and Replace Error
Actually, just looking at the way that Chameleon's find and replace works with <head> and <body> sections, I can see that it could get confused and put in a duplicate copy of the <body> if the original had two pairs of <body> </body> tags in it. Is there any chance that's the case on your site? Perhaps turn off the Chameleon rule, view the frontend page, view the HTML source, and see if there's more than one <body> tag in there.
Stephen
Re: Find and Replace Error
Joomla 3.4.0
Chameleon 2.47
For the Find and Replace, it happens with any of the case / regex options.
The duplicate site was caused by an extra <body> that was in an Ajax Cart module. Removed that and the duplicate is gone.
It is still removing part of the price.
Re: Find and Replace Error
Ok, thanks for the confirmation. I'll do a little more work on the regexes for detecting the head and body sections to try to reduce the chance of that happening again.
Regarding the price things: Can you possibly identify exactly what gets removed? e.g. from the page HTML source?
Does it depend on what you actually find and replace? e.g. does it still happen if you search for "sodfsdkfsldkfjsldkjflk" which does not exist on your page?
Also, does it still happen if you keep the Chameleon rule active, but don't use find-and-replace in the Action? I just wonder if any of the other VM-related code in Chameleon may be messing with the prices, and it may not be find-and-replace malfunctioning.
Thanks,
Stephen (off to triple-check those regexes...)
Re: Find and Replace Error
Oooh, no, hold the line... I have found the issue with the prices. There's a problem with unescaped regex strings in the find-and-replace code. I'll have a new version of Chameleon with this fixed by Monday, latest.
Very sorry for the inconvenience caused – and thank you so much for reporting it.
Best regards,
Stephen
Re: Find and Replace Error
For example:
Before:
<span class="yag_price">$99.95</span>
After:
<span class="yag_price">.95</span>
It does not matter what I put in the find/replace or what method I choose. However, if I do not do any find replace (remove from both fields), then the price is not altered.
It is not just VM, even if I have text in an article, the $xx is removed.
If the price is over $99, it is just the $ and 2 numbers removed. So, $106 was changed to 6.
Board Info
- Board Stats:
- Total Topics:
- 1689
- Total Polls:
- 6
- Total Posts:
- 5944
- Posts this week:
- 1
- User Info:
- Total Users:
- 7671
- Newest User:
- kiresidencescondo2
- Members Online:
- 1
- Guests Online:
- 122
- Online:
- eugene4916
Forum Legend:
Topic
New
Locked
Sticky
Active
New/Active
New/Locked
New Sticky
Locked/Active
Active/Sticky
Sticky/Locked
Sticky/Active/Locked