0

I have an issue with OCMod, it randomly seems to not find lines of code, see below:

<file path="catalog/language/english/product/ymmproduct.php">
        <operation>
            <search trim="true"><![CDATA[
              $_['tab_vehicle']    = 'Vehicles';
              ]]></search>
            <add position="replace"><![CDATA[
              $_['tab_vehicle']    = 'Bikes';
              ]]></add>
        </operation>
    </file>
  • the file path and ned is correct
  • i've tried the search with and without trimming [I'm guessing at what 'trim' does because it's not documented]
  • the line of code I'm searching for is absolutely there - I cut and pasted it from the target file then diff'd the contents.... NO DIFFERENCE.
  • I've tried it with and without line feeds in the CDATA

Nothing I have tried will find that line of code.

What could the issue be?

Sean Kimball
  • 4,506
  • 9
  • 42
  • 73

1 Answers1

0

OCMod is not robust for a multiline search. If you can figure out how to do a single line search, it will be much more likely to work consistently. Since the file catalog/language/english/product/ymmproduct.php isn't in the default installation, is it yours? Perhaps you can create lines in it that will help guide OCMod so a single line search will work properly.

Scott C Wilson
  • 19,102
  • 10
  • 61
  • 83