Just tried to perform update 7301 and got this:

Update #7301
Failed: PDOException: 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 '' at line 1: UPDATE {panels_pane} SET locks=; Array ( ) in db_add_field() (line 2808 of /var/www/rwt3/includes/database/database.inc).

The locks field has been added but is populated with null values.
All panels pages now appear blank and have no way of adding/modifying content in their config.
This is true even of new pages I create.

EDIT: I tried setting the locks field to an empty array like it appears it is meant to be but that didn't fix anything.
Going to the content tab of a panels page throws a warning like: "Theme key "panels_onecol" not found."

Comments

Shadlington’s picture

Issue summary: View changes

Added update on the status of the locks field

Shadlington’s picture

Issue summary: View changes

Another update

Shadlington’s picture

Issue summary: View changes

Another another update

Letharion’s picture

Title: Update 7301 failed » Update 7301 fails

I can confirm I see the PDOException as well.
My site does not break in any apparent way though. Pages still render, and the UI works.
I do get a new column, 'locks', which is filled with null values.

Letharion’s picture

@Shadlington
I'm absolutely not sure about this, but it seems to me like there are two different problems here. Despite the error message, and the column being filled with NULL values, my site continues to function well. This being for a semi-large site that uses Panels for most of the user-facing content, I will stick my neck out and suggest your rendering issues are caused by something else.

merlinofchaos’s picture

Going to the content tab of a panels page throws a warning like: "Theme key "panels_onecol" not found."

This means that the theme registry is somhow missing the themes. Doing a simple cache clear should fix this.

Shadlington’s picture

I reverted to a backup and tried the update again.
Exactly the same thing happened (and I double-checked that the theme registry problem wasn't there before the update).

Clearing the cache worked - thanks!

bryancasler’s picture

@merlin, update 7301 failed. Since I'm using panels everywhere the whole page was blank. I cleared the cache per your suggestion and everything came back. However, no matter what else I try to do I can not get 7301 to succeed updating.

jawi’s picture

Same issue here!
can't update panels.
clearing cache doesn't help

zabelc’s picture

I saw this as well, and immediately afterwards my panels were completely blank both in my site and on the panels admin screens.

I cleared all my caches (drush cc all) 3 times (I've heard one cache clear is occasionally insufficient) and everything appears to be working

Shadlington’s picture

Hrm, now I am unable to add new content to the panels - foolishly didn't test this before but I assume it is related as I have done nothing else to the test site since.

zabelc’s picture

I'll second Shadlinton, I can no longer add contest to panels via the GUI...this is pretty bad.

zabelc’s picture

Ok, I added issue #1355300: Unable to Add Content to Panels for this add new content to panels issue. I even described a weird work-around that lets you add content.

noslokire’s picture

Wow #7. I always tell people to flush cache 3 times jokingly, but it worked in this instance. Didn't work the 1st time, but I went with it, and it worked.

Same symptoms here, Panels ceased rendering, content couldn't be updated, and update 7301 wouldn't apply.

philsward’s picture

Same problem here with the update...

Clearing the cache gave me the content editor, then when I tried to add a piece of content, the ajax window disappeared and left my content editor blank. I saved the page, then decided to try clearing the cache again and my newly created content showed up and works as expected.

If you add content, try clearing the cache after saving it.

raulmuroc’s picture

Panels 7.x 3.x-dev of 27 Nov. Returns the following error when updating database:

The following updates returned messages

panels module

Update #7301
Failed: PDOException: SQLSTATE[HY000]: General error: 1 near "WHERE": syntax error: UPDATE {panels_pane} SET locks= WHERE ( (locks <> ) OR (locks IS NULL ) ) ; Array ( ) in db_add_field() (line 2808 of /usr/home/www/includes/database/database.inc).

Hope it is useful to improve ;)

SNaKeMe’s picture

Update #7301

Failed: DatabaseSchemaObjectExistsException: Das Feld panels_pane.locks kann nicht hinzugefügt werden: Feld bereits vorhanden. in DatabaseSchema_mysql->addField() (Zeile 323 von /.../includes/database/mysql/schema.inc).

SNaKeMe’s picture

And:

Update #7301

Failed: PDOException: 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 '' at line 1: UPDATE {panels_pane} SET locks=; Array ( ) in db_add_field() (Zeile 2808 von /.../includes/database/database.inc).

Letharion’s picture

A problem with the add content interface, that is separate from the schema upgrade, has been identified and hopefully has a fix here #1355300: Unable to Add Content to Panels.

patoshi’s picture

same

Ace Cooper’s picture

The same error remains after both updates for Panel 7.x-3.x-dev dated Nov 29, 2011 and Nov 30, 2011.

panels module
Update #7301
Failed: PDOException: 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 '' at line 1: UPDATE {panels_pane} SET locks=; Array ( ) in db_add_field() (line 2808 of /home/h30424/data/www/mmh6.info/includes/database/database.inc).
Letharion’s picture

We are aware of the problem, and as far as anyone can tell, the error message is just cosmetic.

#1355300: Unable to Add Content to Panels comes from a separate problem that was committed at the same time.

18 posts of "me too" is only wasting maintainer time. If you don't have anything more to add, the please use the follow button instead of posting.

Arnion’s picture

The problem is simple, the function AddField trying to update the field with the initial value does not take into account that must be serialized before using this value. Simply apply the function serialize to initial value.

$schema['panels_pane']['fields']['locks'] = array(
    'type' => 'text',
    'size' => 'big',
    'serialize' => TRUE,
    'object default' => array(),
    'initial' => serialize(array()),
  );
karlshea’s picture

I can confirm slayer3's fix works.

jeffnine’s picture

Same error. Cleared cache multiple times, reran update, and then got this:

Failed: DatabaseSchemaObjectExistsException: Cannot add field panels_pane.locks: field already exists. in DatabaseSchema_mysql->addField() (line 323 of /includes/database/mysql/schema.inc).

merlinofchaos’s picture

Status: Active » Needs review
StatusFileSize
new933 bytes

Can someone test this patch on a pre-7301 database?

jeffnine’s picture

Patch tested. Works great. Thanks.

merlinofchaos’s picture

Status: Needs review » Fixed

Thanks for testing! Committed and pushed.

SNaKeMe’s picture

Okay thx the update work. But now i get these notice:

Notice: Undefined index: access in _menu_translate() (Zeile 778 von /.../includes/menu.inc).
Notice: Undefined index: access in menu_local_tasks() (Zeile 1946 von /.../includes/menu.inc).

I found these http://drupal.org/node/1170358. They talk about that is a cache issue bute when i clear the cache the notice dont go away. any idea?

merlinofchaos’s picture

Those are probably not related. This update didn't make any changes to menu.

Unfortunately it's difficult to tell exactly where those come from; they stem from something putting incorrect data into hook_menu and it's really difficult to spot.

Sometimes it works to get into the code where ti's failing and use dsm() to see what the menu item is that caused it, but it requires some decent PHP and drupal knowledge to do that.

bryancasler’s picture

The latest dev seems to have applied 7301 without a problem

SNaKeMe’s picture

What a fuxx ^^ After deactivating many modules and testing and clearing the cache thousend times ... i have the notice gone away ... the notice is gone after deactivating these module: "Views content panes" ... thank god its friday ;-)

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

Anonymous’s picture

Version: 7.x-3.x-dev » 7.x-3.3
Status: Closed (fixed) » Active

Not sure if this the right place, but I get this error with Panels (sorry, it's in Finnish translation):

DatabaseSchemaObjectExistsException: Taulu panels_node on jo olemassa. funktiossa DatabaseSchema->createTable() (rivi 657 tiedostossa /var/www/customers/cablexfi/public_html/includes/database/schema.inc).

I did some stupid things with Panels and restored from a backup that was prior to installing Panels. Now I cannot seem to get rid of the error no matter what I do.

I have read several threads and my questions is, could I just do the following to remedy the situation (without breaking anything more):

Delete the files at /sites/all/modules/panels

Drop the tables panels_display, panels_layout, panels_mini, panels_node, panels_pane, panels_rendered_pipeline

Reinstall Panels

?

In other words, is there relevant info about Panels somewhere else?

Please help, thanks! :)

merlinofchaos’s picture

Is the translation of that error basically that the panels_node table does not exist?

If that is the case, do the following:

Disable the module 'panels_node'.
Uninstall the module 'panels_node'. (On the modules page there is a tab for "uninstall"). This might give an error that it can't drop the offending table.
Re-enable the module 'panels_node'.

Panels_node module handles its table separately; the reason I suggest that it's just that module is that your error only mentions the one table. If there are other tables you might have to uninstall the Panels module.

Anonymous’s picture

The error says

DatabaseSchemaObjectExistsException: the Table panels_node already exists. in the function DatabaseSchema->createTable() (row 657 in the file /var/www/customers/cablexfi/public_html/includes/database/schema.inc).

merlinofchaos’s picture

Ahh. Hm. That error can probably be ignored, though it might mean that necessary updates to the table may not have been created. You should still go through the uninstall and re-install process to insure the table gets dropped and created correctly.

Anonymous’s picture

After disabling all parts of the Panels module (and clearing all caches just for the hell of it) there is no uninstall option.

I tried once by deleting the /sites/all/modules/panels files. Then it allowed me to reinstall Panels, but the error persists and the model isn't working.

Now I am just hoping for some quick way to get rid of whatever is corrupted so that I could reinstall correctly. I just don't know where the problem is in the database and what I might dare to drop.

Thanks for all the help!

merlinofchaos’s picture

The uninstall page is a tab on the modules page. It can be found at admin/modules/uninstall.

If for some reason you have those tables and your Drupal install does not believe the modules are installed, then you can look at panels.install and panels_node.install (and other .install files) to find exactly which tables to drop. For the most part, the mysql command show tables like 'panels%'; will show you what you need.

Anonymous’s picture

Thanks a lot!

I dropped the tables that begin with Panels, and deleted the module files on the server. Then reinstalled and everything works fine and I can continue using this great module!

Also after this operation the uninstall option is now there when I disable the Panels modules.

Anonymous’s picture

Issue summary: View changes

Updated again

lsolesen’s picture

Issue summary: View changes
Status: Active » Fixed

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.

  • Commit 5aec077 on 7.x-3.x, 7.x-3.x-i18n, 8.x-3.x by merlinofchaos:
    Issue #1353904: Fix update 7301.