After enabling latest 7.x-1.0 on latest Drupal 7.4
on admin/structure/demo/dump has warnings

Error message
Notice: Undefined index: actions in demo_enum_tables() (line 627 of /opt/lampp/htdocs/www/drupal/drupal-7.4/sites/all/modules/demo/demo.admin.inc).
Notice: Undefined index: authmap in demo_enum_tables() (line 627 of /opt/lampp/htdocs/www/drupal/drupal-7.4/sites/all/modules/demo/demo.admin.inc).
Notice: Undefined index: batch in demo_enum_tables() (line 627 of /opt/lampp/htdocs/www/drupal/drupal-7.4/sites/all/modules/demo/demo.admin.inc).
Notice: Undefined index: block in demo_enum_tables() (line 627 of /opt/lampp/htdocs/www/drupal/drupal-7.4/sites/all/modules/demo/demo.admin.inc).
Notice: Undefined index: block_custom in demo_enum_tables() (line 627 of /opt/lampp/htdocs/www/drupal/drupal-7.4/sites/all/modules/demo/demo.admin.inc).
Notice: Undefined index: block_node_type in demo_enum_tables() (line 627 of /opt/lampp/htdocs/www/drupal/drupal-7.4/sites/all/modules/demo/demo.admin.inc).
Notice: Undefined index: block_role in demo_enum_tables() (line 627 of /opt/lampp/htdocs/www/drupal/drupal-7.4/sites/all/modules/demo/demo.admin.inc).
Notice: Undefined index: blocked_ips in demo_enum_tables() (line 627 of /opt/lampp/htdocs/www/drupal/drupal-7.4/sites/all/modules/demo/demo.admin.inc).
Notice: Undefined index: cache in demo_enum_tables() (line 627 of /opt/lampp/htdocs/www/drupal/drupal-7.4/sites/all/modules/demo/demo.admin.inc).
Notice: Undefined index: cache_block in demo_enum_tables() (line 627 of /opt/lampp/htdocs/www/drupal/drupal-7.4/sites/all/modules/demo/demo.admin.inc).
Notice: Undefined index: cache_bootstrap in demo_enum_tables() (line 627 of /opt/lampp/htdocs/www/drupal/drupal-7.4/sites/all/modules/demo/demo.admin.inc).
Notice: Undefined index: cache_field in demo_enum_tables() (line 627 of /opt/lampp/htdocs/www/drupal/drupal-7.4/sites/all/modules/demo/demo.admin.inc).
Notice: Undefined index: cache_filter in demo_enum_tables() (line 627 of /opt/lampp/htdocs/www/drupal/drupal-7.4/sites/all/modules/demo/demo.admin.inc).
Notice: Undefined index: cache_form in demo_enum_tables() (line 627 of /opt/lampp/htdocs/www/drupal/drupal-7.4/sites/all/modules/demo/demo.admin.inc).
Notice: Undefined index: cache_image in demo_enum_tables() (line 627 of /opt/lampp/htdocs/www/drupal/drupal-7.4/sites/all/modules/demo/demo.admin.inc).
Notice: Undefined index: cache_menu in demo_enum_tables() (line 627 of /opt/lampp/htdocs/www/drupal/drupal-7.4/sites/all/modules/demo/demo.admin.inc).
Notice: Undefined index: cache_page in demo_enum_tables() (line 627 of /opt/lampp/htdocs/www/drupal/drupal-7.4/sites/all/modules/demo/demo.admin.inc).
Notice: Undefined index: cache_path in demo_enum_tables() (line 627 of /opt/lampp/htdocs/www/drupal/drupal-7.4/sites/all/modules/demo/demo.admin.inc).
Notice: Undefined index: cache_update in demo_enum_tables() (line 627 of /opt/lampp/htdocs/www/drupal/drupal-7.4/sites/all/modules/demo/demo.admin.inc).
Notice: Undefined index: comment in demo_enum_tables() (line 627 of /opt/lampp/htdocs/www/drupal/drupal-7.4/sites/all/modules/demo/demo.admin.inc).
Notice: Undefined index: date_format_locale in demo_enum_tables() (line 627 of /opt/lampp/htdocs/www/drupal/drupal-7.4/sites/all/modules/demo/demo.admin.inc).
Notice: Undefined index: date_format_type in demo_enum_tables() (line 627 of /opt/lampp/htdocs/www/drupal/drupal-7.4/sites/all/modules/demo/demo.admin.inc).
Notice: Undefined index: date_formats in demo_enum_tables() (line 627 of /opt/lampp/htdocs/www/drupal/drupal-7.4/sites/all/modules/demo/demo.admin.inc).
Notice: Undefined index: field_config in demo_enum_tables() (line 627 of /opt/lampp/htdocs/www/drupal/drupal-7.4/sites/all/modules/demo/demo.admin.inc).
Notice: Undefined index: field_config_instance in demo_enum_tables() (line 627 of /opt/lampp/htdocs/www/drupal/drupal-7.4/sites/all/modules/demo/demo.admin.inc).
Notice: Undefined index: field_data_body in demo_enum_tables() (line 627 of /opt/lampp/htdocs/www/drupal/drupal-7.4/sites/all/modules/demo/demo.admin.inc).
Notice: Undefined index: field_data_comment_body in demo_enum_tables() (line 627 of /opt/lampp/htdocs/www/drupal/drupal-7.4/sites/all/modules/demo/demo.admin.inc).
Notice: Undefined index: field_data_field_image in demo_enum_tables() (line 627 of /opt/lampp/htdocs/www/drupal/drupal-7.4/sites/all/modules/demo/demo.admin.inc).
Notice: Undefined index: field_data_field_tags in demo_enum_tables() (line 627 of /opt/lampp/htdocs/www/drupal/drupal-7.4/sites/all/modules/demo/demo.admin.inc).
Notice: Undefined index: field_revision_body in demo_enum_tables() (line 627 of /opt/lampp/htdocs/www/drupal/drupal-7.4/sites/all/modules/demo/demo.admin.inc).
Notice: Undefined index: field_revision_comment_body in demo_enum_tables() (line 627 of /opt/lampp/htdocs/www/drupal/drupal-7.4/sites/all/modules/demo/demo.admin.inc).
Notice: Undefined index: field_revision_field_image in demo_enum_tables() (line 627 of /opt/lampp/htdocs/www/drupal/drupal-7.4/sites/all/modules/demo/demo.admin.inc).
Notice: Undefined index: field_revision_field_tags in demo_enum_tables() (line 627 of /opt/lampp/htdocs/www/drupal/drupal-7.4/sites/all/modules/demo/demo.admin.inc).
Notice: Undefined index: file_managed in demo_enum_tables() (line 627 of /opt/lampp/htdocs/www/drupal/drupal-7.4/sites/all/modules/demo/demo.admin.inc).
Notice: Undefined index: file_usage in demo_enum_tables() (line 627 of /opt/lampp/htdocs/www/drupal/drupal-7.4/sites/all/modules/demo/demo.admin.inc).
Notice: Undefined index: filter in demo_enum_tables() (line 627 of /opt/lampp/htdocs/www/drupal/drupal-7.4/sites/all/modules/demo/demo.admin.inc).
Notice: Undefined index: filter_format in demo_enum_tables() (line 627 of /opt/lampp/htdocs/www/drupal/drupal-7.4/sites/all/modules/demo/demo.admin.inc).
Notice: Undefined index: flood in demo_enum_tables() (line 627 of /opt/lampp/htdocs/www/drupal/drupal-7.4/sites/all/modules/demo/demo.admin.inc).
Notice: Undefined index: history in demo_enum_tables() (line 627 of /opt/lampp/htdocs/www/drupal/drupal-7.4/sites/all/modules/demo/demo.admin.inc).
Notice: Undefined index: image_effects in demo_enum_tables() (line 627 of /opt/lampp/htdocs/www/drupal/drupal-7.4/sites/all/modules/demo/demo.admin.inc).
Notice: Undefined index: image_styles in demo_enum_tables() (line 627 of /opt/lampp/htdocs/www/drupal/drupal-7.4/sites/all/modules/demo/demo.admin.inc).
Notice: Undefined index: menu_custom in demo_enum_tables() (line 627 of /opt/lampp/htdocs/www/drupal/drupal-7.4/sites/all/modules/demo/demo.admin.inc).
Notice: Undefined index: menu_links in demo_enum_tables() (line 627 of /opt/lampp/htdocs/www/drupal/drupal-7.4/sites/all/modules/demo/demo.admin.inc).
Notice: Undefined index: menu_router in demo_enum_tables() (line 627 of /opt/lampp/htdocs/www/drupal/drupal-7.4/sites/all/modules/demo/demo.admin.inc).
Notice: Undefined index: node in demo_enum_tables() (line 627 of /opt/lampp/htdocs/www/drupal/drupal-7.4/sites/all/modules/demo/demo.admin.inc).
Notice: Undefined index: node_access in demo_enum_tables() (line 627 of /opt/lampp/htdocs/www/drupal/drupal-7.4/sites/all/modules/demo/demo.admin.inc).
Notice: Undefined index: node_comment_statistics in demo_enum_tables() (line 627 of /opt/lampp/htdocs/www/drupal/drupal-7.4/sites/all/modules/demo/demo.admin.inc).
Notice: Undefined index: node_revision in demo_enum_tables() (line 627 of /opt/lampp/htdocs/www/drupal/drupal-7.4/sites/all/modules/demo/demo.admin.inc).
Notice: Undefined index: node_type in demo_enum_tables() (line 627 of /opt/lampp/htdocs/www/drupal/drupal-7.4/sites/all/modules/demo/demo.admin.inc).
Notice: Undefined index: queue in demo_enum_tables() (line 627 of /opt/lampp/htdocs/www/drupal/drupal-7.4/sites/all/modules/demo/demo.admin.inc).
Notice: Undefined index: rdf_mapping in demo_enum_tables() (line 627 of /opt/lampp/htdocs/www/drupal/drupal-7.4/sites/all/modules/demo/demo.admin.inc).
Notice: Undefined index: registry in demo_enum_tables() (line 627 of /opt/lampp/htdocs/www/drupal/drupal-7.4/sites/all/modules/demo/demo.admin.inc).
Notice: Undefined index: registry_file in demo_enum_tables() (line 627 of /opt/lampp/htdocs/www/drupal/drupal-7.4/sites/all/modules/demo/demo.admin.inc).
Notice: Undefined index: role in demo_enum_tables() (line 627 of /opt/lampp/htdocs/www/drupal/drupal-7.4/sites/all/modules/demo/demo.admin.inc).
Notice: Undefined index: role_permission in demo_enum_tables() (line 627 of /opt/lampp/htdocs/www/drupal/drupal-7.4/sites/all/modules/demo/demo.admin.inc).
Notice: Undefined index: search_dataset in demo_enum_tables() (line 627 of /opt/lampp/htdocs/www/drupal/drupal-7.4/sites/all/modules/demo/demo.admin.inc).
Notice: Undefined index: search_index in demo_enum_tables() (line 627 of /opt/lampp/htdocs/www/drupal/drupal-7.4/sites/all/modules/demo/demo.admin.inc).
Notice: Undefined index: search_node_links in demo_enum_tables() (line 627 of /opt/lampp/htdocs/www/drupal/drupal-7.4/sites/all/modules/demo/demo.admin.inc).
Notice: Undefined index: search_total in demo_enum_tables() (line 627 of /opt/lampp/htdocs/www/drupal/drupal-7.4/sites/all/modules/demo/demo.admin.inc).
Notice: Undefined index: semaphore in demo_enum_tables() (line 627 of /opt/lampp/htdocs/www/drupal/drupal-7.4/sites/all/modules/demo/demo.admin.inc).
Notice: Undefined index: sequences in demo_enum_tables() (line 627 of /opt/lampp/htdocs/www/drupal/drupal-7.4/sites/all/modules/demo/demo.admin.inc).
Notice: Undefined index: sessions in demo_enum_tables() (line 627 of /opt/lampp/htdocs/www/drupal/drupal-7.4/sites/all/modules/demo/demo.admin.inc).
Notice: Undefined index: shortcut_set in demo_enum_tables() (line 627 of /opt/lampp/htdocs/www/drupal/drupal-7.4/sites/all/modules/demo/demo.admin.inc).
Notice: Undefined index: shortcut_set_users in demo_enum_tables() (line 627 of /opt/lampp/htdocs/www/drupal/drupal-7.4/sites/all/modules/demo/demo.admin.inc).
Notice: Undefined index: system in demo_enum_tables() (line 627 of /opt/lampp/htdocs/www/drupal/drupal-7.4/sites/all/modules/demo/demo.admin.inc).
Notice: Undefined index: taxonomy_index in demo_enum_tables() (line 627 of /opt/lampp/htdocs/www/drupal/drupal-7.4/sites/all/modules/demo/demo.admin.inc).
Notice: Undefined index: taxonomy_term_data in demo_enum_tables() (line 627 of /opt/lampp/htdocs/www/drupal/drupal-7.4/sites/all/modules/demo/demo.admin.inc).
Notice: Undefined index: taxonomy_term_hierarchy in demo_enum_tables() (line 627 of /opt/lampp/htdocs/www/drupal/drupal-7.4/sites/all/modules/demo/demo.admin.inc).
Notice: Undefined index: taxonomy_vocabulary in demo_enum_tables() (line 627 of /opt/lampp/htdocs/www/drupal/drupal-7.4/sites/all/modules/demo/demo.admin.inc).
Notice: Undefined index: url_alias in demo_enum_tables() (line 627 of /opt/lampp/htdocs/www/drupal/drupal-7.4/sites/all/modules/demo/demo.admin.inc).
Notice: Undefined index: users in demo_enum_tables() (line 627 of /opt/lampp/htdocs/www/drupal/drupal-7.4/sites/all/modules/demo/demo.admin.inc).
Notice: Undefined index: users_roles in demo_enum_tables() (line 627 of /opt/lampp/htdocs/www/drupal/drupal-7.4/sites/all/modules/demo/demo.admin.inc).
Notice: Undefined index: variable in demo_enum_tables() (line 627 of /opt/lampp/htdocs/www/drupal/drupal-7.4/sites/all/modules/demo/demo.admin.inc).
Notice: Undefined index: watchdog in demo_enum_tables() (line 627 of /opt/lampp/htdocs/www/drupal/drupal-7.4/sites/all/modules/demo/demo.admin.inc).

CommentFileSizeAuthor
#21 demo.collate.21.patch1.32 KBsun
#17 demo.pdo-case.17.patch723 bytessun
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

70111m’s picture

Subscribing

arcane’s picture

Subscribing

patoshi’s picture

screenshot: http://prntscr.com/30kum

It seems that its due to it calling an undefined variable that hasnt been set yet. i did this on a fresh drupal 7.8 install and the errors still showed up. the way i fixed it was edit the demo.admin.inc file.

demo.admin.inc

Line: 627:
if ($prefixes[$plain_table] == $table_prefix || $prefixes['default'] == $table_prefix) {

changed to:
if (isset($prefixes[$plain_table]) == $table_prefix || isset($prefixes['default']) == $table_prefix) {

----------

All i did was add an isset() function to the conditionals to check if those variables are set or not.

please reply back if this worked out for you.. and state your Drupal version.

thanks!

hclaus’s picture

Version: 7.x-1.0 » 7.x-1.x-dev

Same error with Drupal 7.10 , and Demo 7.X-1.0 and Demo 7.X-7.X-dev .
The solution #3 worked (tried on Demo 7.X-7.X-dev).
Thanks.

sun’s picture

Status: Needs work » Active
Issue tags: -warnings

Anyone up for writing a patch for this?

The suggested fix in #3 is wrong. isset() returns either TRUE or FALSE. Thus, the following comparison condition no longer compares what it is supposed to compare.

RadioActiv’s picture

Using this in place of #3 should fix the error, and still give the desired comparison.

if ( (isset($prefixes[$plain_table]) && $prefixes[$plain_table] == $table_prefix) || (isset($prefixes['default']) && $prefixes['default'] == $table_prefix) ) {
luco’s picture

I did the fix in #6 but after a recent upgrade the error has returned.

I then rolled back to the change in #3 and the errors disappeared - but the comparison isn't made anymore.

edit: I lost a site I was developing, so do yourselves a favour and don't try this at home.

edit2: I tried Backup and Migrate module but received the same error. apparently as you can see here: #1558680: Notice: Undefined index: name - BM can't read DB table names it's a problem with running Drupal 7.14. for the time being, don't upgrade - and if you did, roll back to D7.13. good luck.

end user’s picture

Just updated to 7.14 and started to get errors when creating a new dump. Will have to restore to previous version.

Notice: Undefined index: comment in _demo_table_is_view() (line 335 of /home/***/domains/***/public_html/sites/all/modules/demo/database_mysql_dump.inc).
Notice: Undefined index: create table in _demo_dump_table_schema() (line 135 of /home/***/domains/***/public_html/sites/all/modules/demo/database_mysql_dump.inc).
Notice: Undefined index: comment in _demo_table_is_view() (line 335 of /home/***/domains/***/public_html/sites/all/modules/demo/database_mysql_dump.inc).
Notice: Undefined index: create table in _demo_dump_table_schema() (line 135 of /home/***/domains/***/public_html/sites/all/modules/demo/database_mysql_dump.inc).
eleleka’s picture

Version: 7.x-1.x-dev » 7.x-1.0

The same trouble in place of #8

nothinghere’s picture

same problem. Any solution ?

sun’s picture

Status: Active » Fixed

I've backported the required fix for this from 8.x-1.x.

The PHP notices are caused by PDO returning table schema information in natural casing instead of lowercase (i.e., "Create table" vs. "create table").

This change was introduced in Drupal core's database layer for Drupal 7.14. That said, I'm not sure how you were able to get those notices in D7 before 7.14.

Thanks for reporting, reviewing, and testing! Committed to all branches.

A new development snapshot will be available within the next 12 hours. This improvement will be available in the next official release.

end user’s picture

I upgraded to the may 12 dev version and when I create a Sanp shot I get this on the final page

Notice: Undefined index: Comment in _demo_table_is_view() (line 335 of /home/ucdemo/domains/ubercartdemo.com/public_html/sites/all/modules/demo/database_mysql_dump.inc).

Also I had a PDO exception when I upgraded to D7.14 and the latest dev version of this module when clicking on the Reset tab. I didn't write it down as I restored the site from backup to try one more time.

artol’s picture

When creating snapshot may 13 dev version I got no warnings after resetting the site i got:
Additional uncaught exception thrown while handling exception.

Original

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 '=utf8_general_ci COLLATE utf8_bin NOT NULL DEFAULT '' COMMENT 'Name of the file ' at line 4 in _demo_reset() (line 345 of /var/www/html/drupal7/sites/all/modules/demo/demo.admin.inc).

Additional

PDOException: SQLSTATE[42S02]: Base table or view not found: 1146 Table 'dp7_default.locales_source' doesn't exist: SELECT s.lid, t.translation, s.version FROM {locales_source} s LEFT JOIN {locales_target} t ON s.lid = t.lid AND t.language = :language WHERE s.source = :source AND s.context = :context AND s.textgroup = 'default'; Array ( [:language] => fi [:source] => The website encountered an unexpected error. Please try again later. [:context] => ) in locale() (line 684 of /var/www/html/drupal7/modules/locale/locale.module).

Uncaught exception thrown in session handler.

PDOException: SQLSTATE[42S02]: Base table or view not found: 1146 Table 'dp7_default.sessions' doesn't exist: SELECT 1 AS expression FROM {sessions} sessions WHERE ( (sid = :db_condition_placeholder_0) AND (ssid = :db_condition_placeholder_1) ) FOR UPDATE; Array ( [:db_condition_placeholder_0] => oWeLDFzsOwoZq7aq4N93oqdI511SQwqHD5srVxQadpc [:db_condition_placeholder_1] => ) in _drupal_session_write() (line 209 of /var/www/html/drupal7/includes/session.inc).

Uncaught exception thrown in shutdown function.

PDOException: SQLSTATE[42S02]: Base table or view not found: 1146 Table 'dp7_default.semaphore' doesn't exist: DELETE FROM {semaphore} WHERE (value = :db_condition_placeholder_0) ; Array ( [:db_condition_placeholder_0] => 13573728464fb23d650b35d6.43870704 ) in lock_release_all() (line 269 of /var/www/html/drupal7/includes/lock.inc).

The site was not usable after this. Luckiy I had backup done with Mysql Workbench.

walpio’s picture

Status: Fixed » Active

Confirmed - latest dev of this module destroys your site completely.

Error
The website encountered an unexpected error. Please try again later.
Error message
PDOException: SQLSTATE[42S02]: Base table or view not found: 1146 Table 'demosite.semaphore' doesn't exist: SELECT expire, value FROM {semaphore} WHERE name = :name; Array ( [:name] => variable_init ) in lock_may_be_available() (line 167 of /var/aegir/platforms/drupal-7.14/includes/lock.inc).
Uncaught exception thrown in shutdown function.

PDOException: SQLSTATE[42S02]: Base table or view not found: 1146 Table 'demosite.semaphore' doesn't exist: DELETE FROM {semaphore} WHERE (value = :db_condition_placeholder_0) ; Array ( [:db_condition_placeholder_0] => 5171662654fbb4b284eb852.44744559 ) in lock_release_all() (line 269 of /var/aegir/platforms/drupal-7.14/includes/lock.inc).
frost’s picture

can also confirmthat latest dev + drupal 7.14 kills site as soon as you try to restore a snapshot

alifopensrc’s picture

Subscribed.

sun’s picture

Version: 7.x-1.0 » 7.x-1.x-dev
Status: Active » Needs review
FileSize
723 bytes

Can you try this patch?

end user’s picture

No go. Applied the patch to a fresh dev download. Worked with 7.12 but after upgrading, creating a new snapshot and resetting I get this

Additional uncaught exception thrown while handling exception.
Original

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 '=utf8_general_ci COLLATE utf8_bin NOT NULL DEFAULT '' COMMENT 'Name of the file ' at line 4 in _demo_reset() (line 345 of /home/ucdemo/domains/ubercartdemo.com/public_html/sites/all/modules/demo/demo.admin.inc).
Additional

PDOException: SQLSTATE[42S02]: Base table or view not found: 1146 Table 'ucdemo_demo.filter_format' doesn't exist: SELECT ff.* FROM {filter_format} ff WHERE (status = :db_condition_placeholder_0) ORDER BY weight ASC; Array ( [:db_condition_placeholder_0] => 1 ) in filter_formats() (line 409 of /home/ucdemo/domains/ubercartdemo.com/public_html/modules/filter/filter.module).
Uncaught exception thrown in session handler.

PDOException: SQLSTATE[42S02]: Base table or view not found: 1146 Table 'ucdemo_demo.sessions' doesn't exist: SELECT 1 AS expression FROM {sessions} sessions WHERE ( (sid = :db_condition_placeholder_0) ) FOR UPDATE; Array ( [:db_condition_placeholder_0] => zB2gTQnPmPu3eSpefClLg7TVjlXGizVbCONgI4DvzdM ) in _drupal_session_write() (line 209 of /home/ucdemo/domains/ubercartdemo.com/public_html/includes/session.inc).
BWPanda’s picture

Priority: Normal » Major
Status: Needs review » Needs work

I'm running the latest dev version of Demo and the latest stable version of Drupal (7.14) and I'm experiencing errors and issues when trying to create or reset snapshots.

As per the errors in #18 above, what I think is happening is that when the database is being restored, it errors out with the first PDOException: SQLSTATE[42000] issue and so the database restore is only half done. The other issues relate to the half-empty database (missing tables, etc.).

I was able to fix this by manually editing the .sql files Demo produces to successfully get backups and restores working again.
The fix is simply this: Remove COLLATE=utf8_general_ci from both the 'filename' and 'uri' lines of the 'file_managed' table structure.

`filename` varchar(255) CHARACTER SET utf8 COLLATE=utf8_general_ci COLLATE utf8_bin NOT NULL DEFAULT ''... becomes
`filename` varchar(255) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL DEFAULT ''...
and
`uri` varchar(255) CHARACTER SET utf8 COLLATE=utf8_general_ci COLLATE utf8_bin NOT NULL DEFAULT ''... becomes
`uri` varchar(255) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL DEFAULT ''...

Hope this helps fix this issue, and/or helps people continue using Demo while this issue's being resolved.

end user’s picture

I'll have to wait for a final solution as my demo site is restored every two hours and I do lots of changes to it so have to create new backups a few times per day.

sun’s picture

Title: admin/structure/demo/dump has warnings » Custom collations in column definitions break the database dump entirely (files table uses utf8_bin since Drupal 7.14)
Status: Needs work » Fixed
FileSize
1.32 KB

Better title.

Thanks for reporting, reviewing, and testing! Committed a fix to all branches.

A new development snapshot will be available within the next 12 hours. This improvement will be available in the next official release.

end user’s picture

Applied the patch and no issues so far.

Status: Fixed » Closed (fixed)

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

Eyal Shalev’s picture

Version: 7.x-1.x-dev » 7.x-1.0
Status: Closed (fixed) » Needs work

After upgrading to D7.14 I get the errors (with 7.x.1.0) even after using the #21 patch.

sun’s picture

Version: 7.x-1.0 » 7.x-1.x-dev
Status: Needs work » Postponed (maintainer needs more info)

@Eyal Shalev: Please test again with the current 7.x-1.x development snapshot.

Also, an existing dump needs to be either fixed manually, or recreated.

Eyal Shalev’s picture

Status: Postponed (maintainer needs more info) » Needs work

@sun,

Thanks for the quick response.

I tried the 7.x-1.x (dev version) and the problem did resolved.

Though for my purposes I would much rather use a recommended (& stable) version then the dev one.

The problem happened when I tried to create a dump and not when restoring from an already created dump.

sun’s picture

Status: Needs work » Closed (fixed)

In that case, reverting issue status.

rCharles’s picture

Version: 7.x-1.x-dev » 7.x-1.0

Same issue: D7.15 with demonstration site 7.x-1.0 stable and dev (with database prefix).

Notice: Undefined index: actions in demo_enum_tables() (line 628 of /home/www/techjester.ca/sites/all/modules/demo/demo.admin.inc).
Notice: Undefined index: authmap in demo_enum_tables() (line 628 of /home/www/techjester.ca/sites/all/modules/demo/demo.admin.inc).
Notice: Undefined index: backup_migrate_destinations in demo_enum_tables() (line 628 of /home/www/techjester.ca/sites/all/modules/demo/demo.admin.inc).
Notice: Undefined index: etc
etc
etc

Solution above works, replace:
if ($prefixes[$plain_table] == $table_prefix || $prefixes['default'] == $table_prefix) {
with

if ((isset ($prefixes[$plain_table]) && $prefixes[$plain_table] == $table_prefix) || $prefixes['default'] == $table_prefix) {
at line 628 in demo.admin.inc, to get rid of the anoying errors.

Seems the 7.1 demo dev version does not appear in the admin configuration list so I had to access it from modules page using the "configure" option.

tchurch’s picture

Version: 7.x-1.0 » 7.x-1.x-dev
Priority: Major » Critical
Status: Closed (fixed) » Active

I don't believe this is fixed.
I've just downloaded the dev version onto 7.20 of Drupal and I get the same message (lots of times).

I have a table prefix defined in my settings.php file (I have a shared_users table and site1_ for the others).

This module is totally unusable at the moment (so I increased to critical and re-opened the issue).

joe_wood’s picture

Working with MySQL Ver 14.14 Distrib 5.5.30, for Linux (x86_64) using readline 5.1, Demo 7.x-1.0+6-dev and Drupal Core 7.21, I found that if I do a MySQL dump of the database after i take the image and then copy that over the one created by demo, it works without the error. Agree the database export should be rewritten.

kingfisher64’s picture

Same as #29 final statement. Have not been able to use this for quite a while - used to love it's functionality.

liza’s picture

so 7.x-1.0+6-dev was working fine until i upgraded Drupal from D7.19 to D7.22. i can make snapshots, i cannot restore them. i have to open the file in Notepad++ and copy and paste the dump onto HeidiSQL because even in that app it's telling me there's a syntax error.

here's the error am getting via HeidiSQL i try to upload the Demo dump:

* SQL Error (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 'ag_admin_page', 'a:0:{}', '', '7', 3, '0', '', 'admin/structure/flags', 'Flags',' at line 1 */

as i said, if i copy and paste the dump & run the query, i have no problems at all --but that defeats the convenience of restoring the DB via the module.

patoshi’s picture

still having the same issues after updating to drupal core to 7.23.

http://prntscr.com/30kum

The snapshot will succeed even with errors, but you cannot restore as it will break your site completely. During a restore it will drop all tables from your database, but it wont restore any of the tables leaving you with an empty database.

For those testing this please do a manual mysql dump before doing anything. Ex. "drush sql-dump > backup.sql"

cfischer50’s picture

The above all happened to me ... fresh install, undefined index in comment, pdo exception, deleted tables. I hope it gets fixed - it would be a great help in the development process!

Kristina Katalinic’s picture

Same thing as everyone lately. It will create a snapshot although with errors but, on restore it dumps the whole database. Another words it will break the site completely

Drupal 7.23 Demonstration Site Module 7.x-1.0

Such a pity, this is a much needed module! Anyone knows of any alternatives?

patoshi’s picture

im just using back up and migrate and backup every 3 hours.

mathieso’s picture

Started working on a D.O page on how to use cron to do site resets. At https://drupal.org/node/2070193.

Contributions welcome.

Kieran

izmeez’s picture

@kristina-k did you try using demo-7.x-1.x-dev or just version 1.0 ?

izmeez’s picture

snapshot and reset seem to be working using Drupal 7.23 and Demo 7.x-1.x-dev database is using utf8-bin collation. Did do a drush sql dump as suggested in #33 just in case :-)

Kristina Katalinic’s picture

@izmeez I only tried 1.0
will give dev a go

mathieso’s picture

Title: Custom collations in column definitions break the database dump entirely (files table uses utf8_bin since Drupal 7.14) » Alternative

Completed post on how to restore demo sites, w/o using the demo module. It needs tech review, though.

https://drupal.org/node/2070193

izmeez’s picture

Title: Alternative » Custom collations in column definitions break the database dump entirely (files table uses utf8_bin since Drupal 7.14)
Priority: Critical » Normal
Status: Active » Fixed

@mathieso, I don't think you should change the title of the issue. Your post while it is an alternative should not hijack the issue.

Also I think this is fixed as in #21 above.

Status: Fixed » Closed (fixed)

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

dman’s picture

Though this does seem to be fixed in dev, it's still not been tagged into a stable release, and the current recommended version 7.x-1.0 is still broken, and will (as noted above) blow away your site if you try to use it.
(Todays Drupal 7.28, demo-7.x-1.0)

I'm glad I took a (manual) backup before proceeding with the recommended version!

I suggest that it's overdue for a point release so that the recommended stable distribution really does work before leaving this closed. (Though I won't re-open it, as it seems to have been batted back and forth a little.)

izmeez’s picture

+1 for a tagged stable release.
Do we need a separate issue to request this?

Andru’s picture

#28's solution made it possible to create a snapshot, but restoring the snapshot wiped all tables but watchdog from the DB as others warned it could. Drupal 7.34 and Version 7.x-1.0 of Demo module.

Seems simpler to just use Backup and Migrate module to make snapshots.

izmeez’s picture

@andru if you were using 7.x-1.0 of demo instead of 7.x-1.x-dev then unfortunately you too have been bitten by the bug that is fixed in the dev release. Using Backup migrate is not the same. If any new tables are created before the restore from backup_migrate they will not be affected, they will not be removed. It will not be a reset.