ABHISHEKARYA131 / vqmod

Automatically exported from code.google.com/p/vqmod
0 stars 0 forks source link

The * regex doesn't work on all cases ?! #8

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Put the following very simple vqmod into opencart:
<modification>
        <id>Opens all of the subcategories in the Categories module</id>
        <version>1.0</version>
        <vqmver>1.0.8</vqmver>
        <author>Chaiavi</author>

        <file name="/catalog/view/theme/default/template/module/category.tpl">
                <operation>
                        <search position = "replace" index = "1" offset="1">
                            <![CDATA[
                    <?php if ($category['children']) { ?>
                            ]]>
                        </search>

                        <add>
                            <![CDATA[
                    <?php if ($category['children']) { ?>
                            <ul style="display:block">
                ]]>
                        </add>
                </operation>
        </file>
</modification>

2. The above mod opens all subcategories on opencart - it works
3. Now change it to apply to all themes by changing the path as follows:
/catalog/view/theme/*/template/module/category.tpl
4. It SHOULD work but now it doesn't

What is the expected output? What do you see instead?
Should open all subcategories...
But I see Nothing - it doesn't work

What version of the product are you using? On what operating system?
Latest Opencart latest VQmod

Please provide any additional information below.

Original issue reported on code.google.com by avrah...@gmail.com on 19 Nov 2011 at 8:22

Attachments:

GoogleCodeExporter commented 9 years ago
There should NOT be a / at the start of the file path. Remove that and see if 
it then works

Original comment by DJG6...@gmail.com on 19 Nov 2011 at 9:23

GoogleCodeExporter commented 9 years ago
Ok, I removed the slash and it worked...

But still the bug remains - the behavior isn't consistent, why did it work with 
the slash when no regex was in the path?

If the slash is needed it should be needed whether or not a regex is in use in 
the path.

Original comment by avrah...@gmail.com on 20 Nov 2011 at 4:36

GoogleCodeExporter commented 9 years ago
That I cannot explain
You shouldn't EVER use a / at the start of the files. The file names are meant 
to be relative, that is they need to start without a / like I said above. NEVER 
USE A / OR \ BEFORE a filename

Original comment by DJG6...@gmail.com on 20 Nov 2011 at 4:43