Problem/Motivation

Trying to test the Special identifier <menu-parent-trail> I faced the following error.

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 'FROM menu_links menu_links WHERE (mlid IN ('4467'))' at line 1: SELECT FROM {menu_links} menu_links WHERE (mlid IN (:db_condition_placeholder_0)) ; Array ( [:db_condition_placeholder_0] => 4467 ) em custom_breadcrumbs_identifiers_cb_identifier_values() (linha 173 de [...]/custom_breadcrumbs/custom_breadcrumbs_identifiers/custom_breadcrumbs_identifiers.module).

Proposed resolution

Fix the missing part of the db_select() syntax.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

revagomes’s picture

Here goes the patch to fix this issue.

TwoD’s picture

Status: Needs review » Reviewed & tested by the community

Yep, this works perfectly!

keboca’s picture

Hi @revagomes, it looks great.@yalfaque and I had same issue long time ago, however we need to solved on another way, in order to finish some requirements.

  • We defined the fields to queries.
  • Also we exposed function to a new hook called: "hook_custom_breadcrumbs_identifiers_values_alter()".

I attached the patch, perhaps you could considerate it.

renatog’s picture

Assigned: revagomes » renatog
Issue tags: +ciandt-contrib
renatog’s picture

Status: Reviewed & tested by the community » Fixed

Hi people.

Thank you very much for contributions.

This issue was been fixed in: #1414674: <menu-parent-trail> brings db errors

Commited in dev branch.

Thank you very much.

Regards.

Status: Fixed » Closed (fixed)

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