I found this issue when i cross checking #2337213: Some drupal_set_message()'s not translated, repeat unnecessarily
This is occurring in the following query in the file
$revisions = db_query("SELECT revision_id, did FROM {panelizer_entity} WHERE entity_type = '$this->entity_type' AND entity_id = :id", array(':id' => $entity_id))->fetchAllAssoc('revision_id');
$dids = db_query("SELECT did FROM {panelizer_entity} WHERE entity_type = '$this->entity_type' AND entity_id = :id", array(':id' => $entity_id))->fetchCol();
$dids = db_query("SELECT did FROM {panelizer_entity} WHERE entity_type = '$this->entity_type' AND entity_id = :id AND view_mode = :view_mode", array(':id' => $entity_id, ':view_mode' => $view_mode))->fetchCol();
Please use the attached patch to avoid this issue.
| Comment | File | Size | Author |
|---|---|---|---|
| #10 | some_dynamic_variables-2337767-10.patch | 2.14 KB | mglaman |
Comments
Comment #1
devd commentedI found this issue when i cross checking the issue id #2337213
This is occurring in the following query in the file
$revisions = db_query("SELECT revision_id, did FROM {panelizer_entity} WHERE entity_type = '$this->entity_type' AND entity_id = :id", array(':id' => $entity_id))->fetchAllAssoc('revision_id');
$dids = db_query("SELECT did FROM {panelizer_entity} WHERE entity_type = '$this->entity_type' AND entity_id = :id", array(':id' => $entity_id))->fetchCol();
$dids = db_query("SELECT did FROM {panelizer_entity} WHERE entity_type = '$this->entity_type' AND entity_id = :id AND view_mode = :view_mode", array(':id' => $entity_id, ':view_mode' => $view_mode))->fetchCol();
Please use the attached patch to avoid this issue.
Comment #3
devd commentedNew patch file
Comment #6
devd commentedNew path for auto testing
Comment #7
devd commentedNew patch for testing.
Comment #8
mglamanUpdated issue summary. This brings queries up to coding standards.
Comment #10
mglamanPatch applied fine locally. Not sure what the bots dealio is. This patch is working fine for me, seems like a good improvement. Re-rolling so test passes then I'll mark RTBC.
I don't know what's going on.
Comment #12
damienmckennaComment #14
mglamanThx Damien for requeue! Since we have a patch that officially applies, marking RTBC. As stated, tested this, deleting Panelizer defaults didn't cause an epic meltdown of sorts, queries work as expected, just standardized!
Comment #15
damienmckennaCommitted. Thank you both!
Comment #20
damienmckennaThere's no need to re-run the patch, I've already committed the fix.