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.

Comments

devd’s picture

I 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.

Status: Needs review » Needs work

The last submitted patch, 1: Use_placeholders_in_queries-2337767-1.patch, failed testing.

devd’s picture

StatusFileSize
new2.14 KB

New patch file

The last submitted patch, 1: Use_placeholders_in_queries-2337767-1.patch, failed testing.

devd’s picture

New path for auto testing

devd’s picture

StatusFileSize
new2.14 KB

New patch for testing.

mglaman’s picture

Issue summary: View changes
Status: Needs work » Needs review

Updated issue summary. This brings queries up to coding standards.

Status: Needs review » Needs work

The last submitted patch, 7: placeholders_not_using-2337767-3.patch, failed testing.

mglaman’s picture

Status: Needs work » Needs review
StatusFileSize
new2.14 KB

Patch 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.

[10:00:35] Command [git apply --check -p1 /var/lib/drupaltestbot/sites/default/files/review/some_dynamic_variables-2337767-10.patch 2>&1] failed
  Duration 0 seconds
  Directory [/var/lib/drupaltestbot/sites/default/files/checkout/sites/default/modules/panelizer]
  Status [1]
 Output: [error: patch failed: plugins/entity/PanelizerEntityDefault.class.php:1988
error: plugins/entity/PanelizerEntityDefault.class.php: patch does not apply].
[10:00:35] Encountered error on [apply], details:
array (
  '@filename' => 'some_dynamic_variables-2337767-10.patch',
  '@reason' => 'Unable to apply patch.  See the log in the details link for more information',
)

Status: Needs review » Needs work

The last submitted patch, 10: some_dynamic_variables-2337767-10.patch, failed testing.

damienmckenna’s picture

Version: 7.x-3.1 » 7.x-3.x-dev
Status: Needs work » Needs review

mglaman’s picture

Status: Needs review » Reviewed & tested by the community

Thx 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!

damienmckenna’s picture

Status: Reviewed & tested by the community » Fixed

Committed. Thank you both!

The last submitted patch, 7: placeholders_not_using-2337767-3.patch, failed testing.

The last submitted patch, 7: placeholders_not_using-2337767-3.patch, failed testing.

damienmckenna’s picture

There's no need to re-run the patch, I've already committed the fix.

Status: Fixed » Closed (fixed)

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