0

I have a file named upgrade-1.0.3-1.0.4.php under CSB/Customer/sql/csb_customer_setup, and I updated the code in config.xml, under CSB/etc, to <version>1.0.4</version>.

On localhost the upgrade is working fine. However, when I put the files in the server the upgrade is not working. I already deleted the content of var/cache.

In PhpMyAdmin, I found a table named core_resource which has the entry CSB_customer_setup set to 1.0.4, both on localhost and on the server. I don't know exactly what this entry is, but at least the value is the last one I defined.

I don't see why in the server it's not working. Any ideas? All help is appreciated.

Edit: here's my code for config.xml:

<?xml version="1.0"?>
<config>
    <modules>
        <CSB_Customer>
            <version>1.0.4</version>
        </CSB_Customer>
    </modules>
    <global>
        <helpers>
            <CSB_customer>
                <class>CSB_Customer_Helper</class>
            </CSB_customer>
        </helpers>
        <resources>
            <CSB_customer_setup>
                <setup>
                    <module>CSB_Customer</module>
                    <class>Mage_Customer_Model_Resource_Setup</class>
                </setup>
            </CSB_customer_setup>
        </resources>
    </global>
    <frontend>
        <layout>
            <updates>
                <CSB_customer>
                    <file>CSB_customer.xml</file>
                </CSB_customer>
            </updates>
        </layout>
        <translate>
            <modules>
                <CSB_Customer>
                    <files>
                        <default>CSB_Customer.csv</default>
                    </files>
                </CSB_Customer>
            </modules>
        </translate>
        <routers>
            <customer>
                <args>
                    <modules>
                        <CSB_customer before="Mage_Customer">CSB_Customer</CSB_customer>
                    </modules>
                </args>
            </customer>
        </routers>
    </frontend>
</config>

2 Answers 2

1

The row in core_resource is added when you have entry inside config.xml.If no setup file exists (or it is in the wrong place) magento just creates the row in the core_resource table and doesn't call any script.

This is a problem if you later add a install-script, which is never called, because the entry already exists.

So You can do below thing -

  1. Check you have uploaded script file at right place.
  2. You can change your module's setup version in core_resource table to the previous version .
  3. refresh any page and check your upgrade table.
2
  • Thanks for your answer. I just tried changing the value in core_resource to 1.0.3, cleared cache and refreshed page. The value becamse again 1.0.4, but the upgrade is still not taking place. I already verified that the script is in the right place. Would it be okay if I delete my files named upgrade in the server, and I put a new one called install-1.0.0.php, and I remove the entry from core-resource? Would that do the work, and would there be any problem?
    – LeCodeur
    Commented Jun 12, 2017 at 8:52
  • if your file is at right place and still your upgrade is not working then you should check your code in script.
    – Piyush
    Commented Jun 12, 2017 at 9:01
-2

check for errors in var/log/system.log and var/log/exception.log

2
  • Just checked and I see no errors related to my issue
    – LeCodeur
    Commented Jun 12, 2017 at 8:31
  • It must be because I see entries from some minutes ago. Anyway, where can I turn it on/off? Thank you for answering.
    – LeCodeur
    Commented Jun 12, 2017 at 8:40

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.