Magento läuft nicht SQL-Install/Update-Skript

Ich habe ein problem mit der Konfiguration oder etwas anderes, das magento nie mein Modul sql-install/update-Skript!

Ich benutze magento-1.4.1.0

Hier ist meine Struktur von Ordnern und Dateien:

\app\code\local\RN\ShortUrl
\app\code\local\RN\ShortUrl\Block\ShortUrl.php

\app\code\local\RN\ShortUrl\controllers\IndexController.php
\app\code\local\RN\ShortUrl\controllers\UController.php

\app\code\local\RN\ShortUrl\etc\config.xml

\app\code\local\RN\ShortUrl\Helper\Url.php

\app\code\local\RN\ShortUrl\Model\ShortUrl.php
\app\code\local\RN\ShortUrl\Model\Mysql4\ShortUrl.php
\app\code\local\RN\ShortUrl\Model\Mysql4\ShortUrl\Collection.php

\app\code\local\RN\ShortUrl\Model
\app\code\local\RN\ShortUrl\Model\Mysql4
\app\code\local\RN\ShortUrl\Model\Mysql4\ShortUrl

\app\code\local\RN\ShortUrl\sql\rn_shorturl_setup\mysql4-install-0.1.0.php

Hier der Inhalt der \app\etc\modules\RN_ShortUrl.xml:

<?xml version="1.0" encoding="UTF-8"?>    
<config>
    <modules>
        <RN_ShortUrl>
            <active>true</active>
            <codePool>local</codePool>
        </RN_ShortUrl>
    </modules>
</config>

Hier der Inhalt der \app\code\local\RN\ShortUrl\etc\config.xml:

<?xml version="1.0"?>
<config>
<modules>
    <RN_ShortUrl>
        <version>0.1.0</version>
    </RN_ShortUrl>
</modules>
<frontend>
    <routers>
        <shorturl>
            <use>standard</use>
            <args>
                <module>RN_ShortUrl</module>
                <frontName>shorturl</frontName>
            </args>
        </shorturl>
    </routers>
    <layout>
        <updates>
            <shorturl>
                <file>shorturl.xml</file>
            </shorturl>
        </updates>
    </layout>
</frontend>
<global>
    <blocks>
        <rn_shorturl>
            <class>RN_ShortUrl_Block</class>
        </rn_shorturl>
    </blocks>
    <rewrite>
        <rn_shorturl>
            <from>#^/u/(.*)#</from>
            <to>/shorturl/u/redirect/key/$1</to>
        </rn_shorturl>
    </rewrite>

    <models>
        <shorturl>
            <class>RN_ShortUrl_Model</class>
            <resourceModel>shorturl_mysql4</resourceModel>
        </shorturl>
        <shorturl_mysql4>
            <class>RN_ShortUrl_Model_Mysql4</class>
            <entities>
                <shorturl>
                    <table>shorturl</table>
                </shorturl>
            </entities>
        </shorturl_mysql4>
    </models>
    <resources>
        <shorturl_setup>
            <setup>
                <module>RN_ShortUrl</module>
            </setup>
            <connection>
                <use>core_setup</use>
            </connection>
        </shorturl_setup>
        <shorturl_write>
            <connection>
                <use>core_write</use>
            </connection>
        </shorturl_write>
        <shorturl_read>
            <connection>
                <use>core_read</use>
            </connection>
        </shorturl_read>
    </resources>
    <helpers>
        <shorturl>
            <class>RN_ShortUrl_Helper</class>
        </shorturl>
    </helpers>
</global>

Hier ist meine Installation SQL-Skript:

<?php
    $installer = $this;
    $installer->startSetup();

    $installer->run("
            DROP TABLE IF EXISTS {$this->getTable('shorturl')};
            CREATE TABLE {$this->getTable('shorturl')} (
            `shorturl_id` INTEGER(10) UNSIGNED NOT NULL AUTO_INCREMENT,
            `shorted_key` VARCHAR(255) COLLATE utf8_general_ci NOT NULL DEFAULT '',
            `long_url` VARCHAR(255) COLLATE utf8_general_ci NOT NULL DEFAULT '',
            PRIMARY KEY (`shorturl_id`),
            INDEX (shorted_key),
            INDEX (long_url)
            )ENGINE=InnoDB CHARACTER SET 'utf8' COLLATE 'utf8_general_ci';"
    );

    /* right before this */
    $installer->endSetup();

Habe ich versucht mein Modul von der version und erstellt das upgrade-Skript "mysql4-upgrade-1.0-1.1.php" aber immer noch nicht funktioniert, aber ich könnte mein Modul.

http://magento.test/shorturl/index/generate/?url=http://realestate.cambodiachic.com/property-detail-hotel-restaurant-on-kampot-river-93.html

Es funktioniert außer dem problem, das ich mich zu Fragen.

Vielen Dank im Voraus,

Rithy

Tipp: wenn Sie möchten, zu bekommen, Fragen beantwortet, jedoch nicht setzen Sie Wörter wie "Dringend" im Titel
ok, vielen Dank für ur-Kommentar!

InformationsquelleAutor Rithy | 2010-09-01

Schreibe einen Kommentar