Every time I create a new panel of type mini panel och panel pages this warning below is shown. At the same time content from my first created panel (created with Panels 5.x-1.2) are placed in my new panels even though they don't share url paths or any other information.
user warning: Duplicate entry '2' for key 1 query: INSERT INTO intranetpanels_display (did, layout, layout_settings, panel_settings) VALUES (2, 'twocol', 'N;', 'a:1:{s:5:\"style\";s:7:\"default\";}') in /var/www/html/intranet/includes/database.mysqli.inc on line 151.
Comments
Comment #1
merlinofchaos commentedWhen did you upgrade from 1.2 to the alphas?
What is wrong here is the sequence id for your displays. This is only going to be fixable by manually editing your database.
First, I recommend you just delete all your mini panels for the moment.
Then, I recommend you run this query:
SELECT max(did) FROM intranetpanels_display;
INSERT INTO intranetsequences (name, id) VALUES ('intranetpanels_display_did', XXX);
Where XXX is the result of the first SELECT query.
I'm not sure how you got into this state, though.
Comment #2
merlinofchaos commentedComment #3
bitman commentedI had the same problem when upgrading from 1.2 to 2.0-alpha12. The reason is that the update script and the module each use different names for this sequence.
In panels.module, the sequence is named "{panels_display}_id". In panels.install, the panels_update_1000 function creates a sequence named "{panels_display}_did" instead.
Since this upgrade path is going to be pretty common, I'd suggest that the install script be fixed.
Comment #4
merlinofchaos commentedThis is fixed in -dev and will go out in alpha12.
Comment #5
(not verified) commented