Download & Extend

PDOException Canceling event registration with Entity Cache

Project:Drupal Commons
Version:7.x-3.0-beta1
Component:Events
Category:bug report
Priority:major
Assigned:jpontani
Status:closed (fixed)

Issue Summary

I noticed the following behaviour when trying out Commons (commons-7.x-3.0-beta1-core).

Visit the Events page
'Attend' the Ribfest
Click 'Cancel' to change your mind and...

PDOException: SQLSTATE[42S02]: Base table or view not found: 1146 Table 'commons.cache_entity_registration' doesn't exist: DELETE FROM {cache_entity_registration} WHERE (cid IN (:db_condition_placeholder_0)) ; Array ( [:db_condition_placeholder_0] => 2 ) in cache_clear_all() (line 176 of C:\d7\local\commons\includes\cache.inc).

I noticed also that clicking 'back' on the browser and then clicking 'Cancel' a second time successfully cancels your attendance.

Comments

#1

Same issue here,when I click on "Attend" and then on "Cancel" I take PDO exception error
PDOException: SQLSTATE[42S02]: Base table or view not found: 1146 Table 'commons3.cache_entity_registration' doesn't exist: DELETE FROM {cache_entity_registration} WHERE (cid IN (:db_condition_placeholder_0)) ; Array ( [:db_condition_placeholder_0] => 2 ) in cache_clear_all() (line 176 of /var/www/commons3/includes/cache.inc).

#2

Same here. Tracked it down to registration module not supporting entity cache properly.

I've posted a patch, if you apply that to the registration module then it works ok. Here it is:

#1867564: Update Entity cache support

#3

Same here. Install time patch from #2 applied.

PDOException: SQLSTATE[42S02]: [Microsoft][SQL Server Native Client 11.0][SQL Server]Ungültiger Objektname 'registration_type'.: SELECT base.[id] AS [id], base.[name] AS [name], base.[label] AS [label], base.[weight] AS [weight], base.[locked] AS [locked], base.[data] AS [data], base.[status] AS [status], base.[module] AS [module] FROM {registration_type} base; Array ( ) in EntityAPIController->query() (line 152 of C:\inetpub\wwwroot\profiles\commons\modules\contrib\entity\includes\entity.controller.inc).

#4

Title:PDOException: SQLSTATE[42S02]:» PDOException Canceling event registration with Entity Cache

#5

Priority:normal» major

Bumping priority to "major" so we can address this before 3.0.

#6

Assigned to:Anonymous» jpontani

#7

Status:active» needs review

Attached is a patch that fixes the Registration module to properly support entitycache. The issue is the entity info was not properly adding the entity cache config to the return array.

Also attached is a patch for commons makefile to include the patch until it gets applied to the Registration module.

See latest comment, didn't see the patch in the linked issue from #2.

AttachmentSize
1867318.registration.entity_cache_support.7.patch 565 bytes
1867318.commons.registration_entity_cache_path.7.patch 588 bytes

#8

Status:needs review» needs work

#7 may be pointless. See #1867564: Update Entity cache support. Will create a commons patch to include that patch instead of mine.

#9

Status:needs work» needs review

Updated commons makefile patch that has the patch from linked issue in #8.

AttachmentSize
1867318.commons.registration_entity_cache_patch.9.patch 585 bytes

#10

Status:needs review» fixed

Thanks!

I updated the code comment to point to the Registration module issue that contains the patch and committed.

http://drupalcode.org/project/commons.git/commit/518fe58

#11

Status:fixed» needs work

This breaks the Commons build because the referenced patch doesn't apply. Per #3 on that issue, the patch also needs to be re-rolled to include a hook_update_n() implementation. I've reverted the commit in #10: http://drupalcode.org/project/commons.git/commit/fb8ae00.

#12

#13

Status:needs work» fixed

The latest patch to Entity Registration module is now included. Thanks, Matt V!

http://drupalcode.org/project/commons.git/commit/6a61fbd

#14

Status:fixed» closed (fixed)

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