0

When i go to start page I see

There has been an error processing your request

Exception printing is disabled by default for security reasons.

a:5:{i:0;s:512:"Error in file: "/var/www/hosts/mage-composer/src/app/code/local/Hotels/Hotels/sql/hotels_setup/mysql4-install-0.1.0.php" - SQLSTATE[42S01]: Base table or view already exists: 1050 Table '$ hotel_id int UNSIGNED NOT NULL auto_increment COMMENT 'Hotel_id' ,
hotel_name text NULL COMMENT 'Hotel_name' , hotel_address text NULL COMMENT 'Hotel_address' , PRIMARY KEY (hotel_id) ) COMMENT='hotel' ENGINE=INNODB charset=utf8 COLLATE=utf8_general_ci";i:1;s:1018:"#0 /var/www/hosts/mage-composer/src/app/code/core/Mage/Core/Model/Resource/Setup.php(644): Mage::exception('Mage_Core', '$ 1 /var/www/hosts/mage-composer/src/app/code/core/Mage/Core/Model/Resource/Setup.php(421): Mage_Core_Model_Resource_Setup->_modifyResourceDb('install', '', '0.1.7') 2 /var/www/hosts/mage-composer/src/app/code/core/Mage/Core/Model/Resource/Setup.php(327): Mage_Core_Model_Resource_Setup->_installResourceDb('0.1.7') 3 /var/www/hosts/mage-composer/src/app/code/core/Mage/Core/Model/Resource/Setup.php(235): Mage_Core_Model_Resource_Setup->applyUpdates() 4 /var/www/hosts/mage-composer/src/app/code/core/Mage/Core/Model/App.php(428): Mage_Core_Model_Resource_Setup::applyAllUpdates() 5 /var/www/hosts/mage-composer/src/app/code/core/Mage/Core/Model/App.php(354): Mage_Core_Model_App->_initModules() 6 /var/www/hosts/mage-composer/src/app/Mage.php(692): Mage_Core_Model_App->run(Array) 7 /var/www/hosts/mage-composer/src/index.php(83): Mage::run('csny', 'website') 8 {main}";s:3:"url";s:1:"/";s:11:"script_name";s:10:"/index.php";s:4:"skin";s:7:"default";}

My config:

      <?xml version="1.0"?>
<config>
    <modules>
        <Hotels_Hotels>
            <version>0.1.6</version>
        </Hotels_Hotels>
    </modules>
    <global>
        <helpers>
            <hotels>
                <class>Hotels_Hotels_Helper</class>
            </hotels>
        </helpers>
        <blocks>
            <hotels>
                <class>Hotels_Hotels_Block</class>
            </hotels>
        </blocks>
        <models>
            <hotels>
                <class>Hotels_Hotels_Model</class>
                <resourceModel>hotels_mysql4</resourceModel>
            </hotels>
            <hotels_mysql4>
                <class>Hotels_Hotels_Model_Mysql4</class>
                <entities>
                    <hotel>
                        <table>hotel</table>
                    </hotel>
                    <order_hotel>
                        <table>hotel_order</table>
                    </order_hotel>
                    <replacement>
                        <table>hotel_replacement</table>
                    </replacement>
                    <store_hotel>
                        <table>hotel_store</table>
                    </store_hotel>
                    <stores_hotel>
                        <table>hotel_stores</table>
                    </stores_hotel>
                    <agent_code>
                        <table>agent_code</table>
                    </agent_code>
                    <product_code>
                        <table>product_code</table>
                    </product_code>
                </entities>
            </hotels_mysql4>

        </models>
        <resources>
            <hotels_setup>
                <setup>
                    <module>Hotels_Hotels</module>
                </setup>
                <connection>
                    <use>core_setup</use>
                </connection>
            </hotels_setup>
            <hotels_write>
                <connection>
                    <use>core_write</use>
                </connection>
            </hotels_write>
            <hotels_read>
                <connection>
                    <use>core_read</use>
                </connection>
            </hotels_read>
            <!--    <salesattribute1350922843_setup>
                <setup>
                    <module>Hotels_Hotels</module>
                    <class>Mage_Sales_Model_Mysql4_Setup</class>
                </setup>
                <connection>
                    <use>core_setup</use>
                </connection>
            </salesattribute1350922843_setup>
            <salesattribute1350922843_write>
                <connection>
                    <use>core_write</use>
                </connection>
            </salesattribute1350922843_write>
            <salesattribute1350922843_read>
                <connection>
                    <use>core_read</use>
                </connection>
            </salesattribute1350922843_read>
            <customerattribute1350922843_setup>
                <setup>
                    <module>Hotels_Hotels</module>
                    <class>Mage_Customer_Model_Entity_Setup</class>
                </setup>
                <connection>
                    <use>core_setup</use>
                </connection>
            </customerattribute1350922843_setup>
            <customerattribute1350922843_write>
                <connection>
                    <use>core_write</use>
                </connection>
            </customerattribute1350922843_write>
            <customerattribute1350922843_read>
                <connection>
                    <use>core_read</use>
                </connection>
            </customerattribute1350922843_read> -->
        </resources>
        <events>
            <controller_action_predispatch>
                <observers>
                    <hotel_controller_action_predispatch>
                        <type>singleton</type>
                        <class>Hotels_Hotels_Model_Observer</class>
                        <method>addCustomerHotel</method>
                    </hotel_controller_action_predispatch>
                </observers>
            </controller_action_predispatch> 
            <sales_convert_quote_to_order>
                <observers>
                    <hotel_sales_convert_quote_to_order>
                        <type>singleton</type>
                        <class>Hotels_Hotels_Model_Observer</class>
                        <method>addCustomerHotelToOrder</method>
                    </hotel_sales_convert_quote_to_order>
                </observers>
            </sales_convert_quote_to_order>    
        </events>
    </global>
    <admin>
        <routers>
            <hotels>
                <use>admin</use>
                <args>
                    <module>Hotels_Hotels</module>
                    <frontName>hotels</frontName>
                </args>
            </hotels>
        </routers>
    </admin>
    <adminhtml>
        <menu>
            <customer>
                <children>
                    <!-- <hotelsbackend module="hotels">
                        <title>Hotels</title>
                        <sort_order>0</sort_order>
                        <action>hotels/adminhtml_hotelsbackend</action>
                    </hotelsbackend> -->
                    <hotels module="hotels">
                        <title>Manage Hotels</title>
                        <sort_order>0</sort_order>
                        <action>hotels/adminhtml_hotel</action>
                    </hotels>
                </children>
            </customer>
        </menu>
        <layout>
            <updates>
                <hotels>
                    <file>hotels.xml</file>
                </hotels>
            </updates>
        </layout>
    </adminhtml>
</config> 

And I have this in my database: enter image description here

What it can be?

  • I assume the screenshot is from core_resource? How comes it say's its version is 1.7 when your config is 1.6? What has been done in the mentioned migration process? – Christoph Farnleitner Jan 20 '18 at 15:28
  • 1
    @ChristophFarnleitner I changed it for test. I solved the problem, it was in locale.xml. I didn't write prefix. Thank you for answer :) – Павел Кушнеревич Jan 20 '18 at 15:41
  • Great that you figured out what the issue was! May I invite you to briefly explain your solution as an actual answer so others are able to profit from the same as well? – Christoph Farnleitner Jan 25 '18 at 3:48

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.