Quantcast
Channel: Programmierung - Shopware Community Forum
Viewing all articles
Browse latest Browse all 2871

SW 5.2 createMenuItem

$
0
0

hi, in einem Plugin erstelle ich ein neues MenuItem

 

$item = $this->createMenuItem(array(
            'label'      => 'My-Item',
            'class'      => 'sprite-drive-download',
            'active'     => 1,
            'position'  => 99,
            'action'     => 'Index',
            'controller' => 'MyController',
            'parent'     => $this->Menu()->findOneBy('label', 'Inhalte'),
        ));
        $this->Menu()->addItem($item);
        $this->Menu()->save();

 

in SW 5.2.1 erhalte ich bei der Installation folgenden fehler:

 

Unable to install, got exception:
An exception occurred while executing 'SELECT t0.id AS id_1, t0.name AS name_2, t0.onclick AS onclick_3, t0.class AS class_4, t0.position AS position_5, t0.active AS active_6, t0.pluginID AS pluginID_7, t0.controller AS controller_8, t0.action AS action_9, t0.shortcut AS shortcut_10, t0.parent AS parent_11, t0.parent AS parent_12, t0.pluginID AS pluginID_13 FROM s_core_menu t0 ORDER BY  LIMIT 1':

SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'LIMIT 1' at line 1

 

Hat sich hier in SW 5.2 etwas geändert? WIe erstelle ich ein Menüeintrag in SW 5.2?

 

Vielen Dank


Viewing all articles
Browse latest Browse all 2871

Trending Articles