Welcome to the MetaMod and Chameleon Support Forums.

Before posting, please check out the FAQs.

helpme

 

Need extra help with your Joomla site? Consider paid Joomla support by the developer of Chameleon and MetaMod.

 

Find and Replace Error

Find and Replace Error

When we use the Find and Replace, all of the Virtuemart prices before the decimal are removed.  For example $9.95 becomes .95.  Then a duplicate of the site appears in the right side column.

mhogan
Beginner Modder
ranks
useravatar
Offline
6 Posts
Administrator has disabled public posting

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

Stephen Brandon
MetaMod / Chameleon developer
If you use MetaMod or Chameleon, please post a rating and a review at the Joomla! Extensions Directory: Chameleon | MetaMod

metamodguy
useravatar
Offline
3319 Posts
User info in posts
Administrator has disabled public posting

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

Stephen Brandon
MetaMod / Chameleon developer
If you use MetaMod or Chameleon, please post a rating and a review at the Joomla! Extensions Directory: Chameleon | MetaMod

metamodguy
useravatar
Offline
3319 Posts
User info in posts
Administrator has disabled public posting

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.

mhogan
Beginner Modder
ranks
useravatar
Offline
6 Posts
Administrator has disabled public posting

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...)

Stephen Brandon
MetaMod / Chameleon developer
If you use MetaMod or Chameleon, please post a rating and a review at the Joomla! Extensions Directory: Chameleon | MetaMod

metamodguy
useravatar
Offline
3319 Posts
User info in posts
Administrator has disabled public posting

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

Stephen Brandon
MetaMod / Chameleon developer
If you use MetaMod or Chameleon, please post a rating and a review at the Joomla! Extensions Directory: Chameleon | MetaMod

metamodguy
useravatar
Offline
3319 Posts
User info in posts
Administrator has disabled public posting

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.

mhogan
Beginner Modder
ranks
useravatar
Offline
6 Posts
Administrator has disabled public posting

Re: Find and Replace Error

Any ETA on a new version?

mhogan
Beginner Modder
ranks
useravatar
Offline
6 Posts
Administrator has disabled public posting

Re: Find and Replace Error

Hi,

I emailed you the new version last week so you could test it - did you receive that?

Thanks,
Stephen

Stephen Brandon
MetaMod / Chameleon developer
If you use MetaMod or Chameleon, please post a rating and a review at the Joomla! Extensions Directory: Chameleon | MetaMod

metamodguy
useravatar
Offline
3319 Posts
User info in posts
Administrator has disabled public posting

Board Info

Board Stats:
 
Total Topics:
1675
Total Polls:
6
Total Posts:
5917
Posts this week:
6
User Info:
 
Total Users:
11577
Newest User:
owens65784
Members Online:
0
Guests Online:
157

Online: 
There are no members online

Forum Legend:

 Topic
 New
 Locked
 Sticky
 Active
 New/Active
 New/Locked
 New Sticky
 Locked/Active
 Active/Sticky
 Sticky/Locked
 Sticky/Active/Locked