Whenever I try to add a menu link context, I get a wordy AJAX error. Seems something's wrong with the query it's trying to use? I'm not too sure as my expertise lies in CSS stuff and this is a bit beyond me, so any help you can provide would be very much appreciated.

This is our own server so if there is a server configuration or something that is required we should be able to do it, as of now I'm not sure where it's going wrong. The configuration is almost completely default, with a couple extra modules that shouldn't really be related I don't think.

Here is the error (which comes via popup box a few seconds after typing anything at all in the auto-complete field.

An AJAX HTTP error occurred.
HTTP Result Code: 500
Debugging information follows.
Path: http://usp.cpstest1.info/ctools/autocomplete/menu_link
StatusText: error
ResponseText: PDOException: SQLSTATE[42S22]: Column not found: 1054 Unknown column 'b.title' in 'field list': SELECT b.mlid AS mlid, b.title AS title
FROM
{menu_links} b
WHERE (b.title LIKE :db_condition_placeholder_0 ESCAPE '\\')
LIMIT 10 OFFSET 0; Array
(
[:db_condition_placeholder_0] => %a%
)
in ctools_content_autocomplete_entity() (line 63 of /var/www/html/d7/sites/all/modules/ctools/includes/content.menu.inc).

Comments

merlinofchaos’s picture

Project: Panels » Chaos Tool Suite (ctools)
Version: 7.x-3.2 » 7.x-1.x-dev
Component: Mini panels » Plugins system
Priority: Normal » Major

Well that's ugly. The error is in CTools.

TelFiRE’s picture

Ah, should have noticed that, my bad.

Any troubleshooting steps you could recommend?

merlinofchaos’s picture

My best guess is that maybe that's a piece of code that was not properly updated from D7, OR a change to D7 table structure broke the code. Would need to check the query being run and see what's going on there. It's menu system so the difficulty of debugging it is probably quadrupled.

TelFiRE’s picture

That isn't the query shown in the error? How can I get it? Would I be better off just re-downloading CTools or something

TelFiRE’s picture

Status: Active » Fixed

Hey I'm sorry to have bugged you! I found the problem, some of my modules were corrupt including CTools and I'm pretty sure re-installing is going to fix this, thanks for your assistance and my apologies for not noticing before I bugged you!

TelFiRE’s picture

Status: Fixed » Needs review

Well again my apologies for a premature decision but evidently that was not the only problem as this is still occurring.

I just pulled up the logs that are generated. 2 are created whenever this error occurs.

Type php
Date Thursday, May 24, 2012 - 12:27
User admin
Location http://usp.cpstest1.info/ctools/context/ajax/add/export_ui%3A%3Apanels_m...
Referrer http://usp.cpstest1.info/admin/structure/mini-panels/add/context?render=...
Message Notice: Undefined index: entity_id in ctools_context_entity_settings_form() (line 140 of /var/www/html/d7/sites/all/modules/ctools/plugins/contexts/entity.inc).
Severity notice
Hostname 67.139.187.38

Type php
Date Thursday, May 24, 2012 - 12:27
User admin
Location http://usp.cpstest1.info/ctools/autocomplete/menu_link/a
Referrer http://usp.cpstest1.info/admin/structure/mini-panels/add/context?render=...
Message PDOException: SQLSTATE[42S22]: Column not found: 1054 Unknown column 'b.title' in 'field list': SELECT b.mlid AS mlid, b.title AS title FROM {menu_links} b WHERE (b.title LIKE :db_condition_placeholder_0 ESCAPE '\\') LIMIT 10 OFFSET 0; Array ( [:db_condition_placeholder_0] => %a% ) in ctools_content_autocomplete_entity() (line 63 of /var/www/html/d7/sites/all/modules/ctools/includes/content.menu.inc).
Severity error
Hostname 67.139.187.38

swentel’s picture

Priority: Major » Normal
Status: Needs review » Active

@merlinofchaos : he's trying to add a menu link context, however, menu / menu links aren't entities in core, so this never ever can work at all.
Note, competely untested, just looked at the code of ctools_content_autocomplete_entity().

merlinofchaos’s picture

...there's a menu link context?!

Is this something that's happening because of fago's entity module?

swentel’s picture

Status: Active » Postponed (maintainer needs more info)

Dont' think so, there 's only one content type plugin in the entity module.

@TelFiRE
could you post the list of modules that you're using ?

merlinofchaos’s picture

CTools tries to make all entities available as context.

But entity module makes a bunch of pseudo entities that aren't really entities. That's why I'm curious about menu links being available as a context.

TelFiRE’s picture

Maybe I don't understand how it's supposed to work and that's my problem.... Because I haven't really been able to build anything useful, even after realizing this was an Ajax-only thing and it actually still accepts proper values.

Here's my modules.

0 Core Block 7.14
1 Core Color 7.14
2 Core Comment 7.14
3 Core Contextual links 7.14
4 Core Database logging 7.14
5 Core Field 7.14
6 Core Field SQL storage 7.14
7 Core Field UI 7.14
8 Core File 7.14
9 Core Filter 7.14
10 Core Help 7.14
11 Core Image 7.14
12 Core List 7.14
13 Core Menu 7.14
14 Core Node 7.14
15 Core Number 7.14
16 Core Options 7.14
17 Core Overlay 7.14
18 Core Path 7.14
19 Core PHP filter 7.14
20 Core RDF 7.14
21 Core Search 7.14
22 Core Shortcut 7.14
23 Core System 7.14
24 Core Taxonomy 7.14
25 Core Text 7.14
26 Core Update manager 7.14
27 Core User 7.14
28 Administration Administration Development tools 7.x-3.0-rc3
29 Administration Administration menu 7.x-3.0-rc3
30 CCK Location CCK 7.x-3.x-dev
31 Chaos tool suite Chaos tools 7.x-1.0
32 Chaos tool suite Custom content panes 7.x-1.0
33 Chaos tool suite Custom rulesets 7.x-1.0
34 Chaos tool suite Page manager 7.x-1.0
35 Chaos tool suite Stylizer 7.x-1.0
36 Chaos tool suite Views content panes 7.x-1.0
37 Commerce Cart 7.x-1.3
38 Commerce Checkout 7.x-1.3
39 Commerce Commerce 7.x-1.3
40 Commerce Commerce UI 7.x-1.3
41 Commerce Customer 7.x-1.3
42 Commerce Customer UI 7.x-1.3
43 Commerce Line Item 7.x-1.3
44 Commerce Order 7.x-1.3
45 Commerce Order UI 7.x-1.3
46 Commerce Payment 7.x-1.3
47 Commerce Payment Method Example 7.x-1.3
48 Commerce Payment UI 7.x-1.3
49 Commerce Price 7.x-1.3
50 Commerce Product 7.x-1.3
51 Commerce Product Pricing 7.x-1.3
52 Commerce Product Pricing UI 7.x-1.3
53 Commerce Product Reference 7.x-1.3
54 Commerce Product UI 7.x-1.3
55 Commerce Tax 7.x-1.3
56 Commerce Tax UI 7.x-1.3
57 Date/Time Date 7.x-2.5
58 Date/Time Date All Day 7.x-2.5
59 Date/Time Date API 7.x-2.5
60 Date/Time Date Popup 7.x-2.5
61 Date/Time Date Repeat API 7.x-2.5
62 Date/Time Date Repeat Field 7.x-2.5
63 Date/Time Date Tools 7.x-2.5
64 Date/Time Date Views 7.x-2.5
65 Development Devel 7.x-1.2
66 Development Devel generate 7.x-1.2
67 Fields Address Field 7.x-1.0-beta3
68 Fields Fieldgroup 7.x-1.1
69 Fields Geofield 7.x-1.0
70 Image SmartCrop 7.x-1.0-beta2
71 Location Location 7.x-3.x-dev
72 Media Epsa Crop 7.x-2.2
73 Media Image Text Effects 7.x-1.0
74 Media Imagecache Actions 7.x-1.0
75 Media Imagecache Canvas Actions 7.x-1.0
76 Media Imagecache Color Actions 7.x-1.0
77 Media Imagecache Custom Actions 7.x-1.0
78 Media IMCE 7.x-1.5
79 Media IMCE Crop 7.x-1.0
80 Media IMCE Mkdir 7.x-1.0
81 Meta tags Meta tags 7.x-1.0-alpha6
82 Nodequeue Nodequeue 7.x-2.0-beta1
83 OpenLayers OpenLayers 7.x-2.0-beta1
84 OpenLayers OpenLayers UI 7.x-2.0-beta1
85 OpenLayers OpenLayers Views 7.x-2.0-beta1
86 Other AddToAny 7.x-3.1
87 Other Block Class 7.x-1.1
88 Other Colorbox 7.x-1.3
89 Other CPS Web Admin
90 Other Entity API 7.x-1.0-rc3
91 Other Entity tokens 7.x-1.0-rc3
92 Other Geofield Map 7.x-1.0
93 Other Google weather 7.x-1.0-beta2
94 Other Libraries 7.x-1.0
95 Other Masquerade 7.x-1.0-rc4
96 Other Menu attributes 7.x-1.0-rc1
97 Other Pathauto 7.x-1.1
98 Other Security Review 7.x-1.0
99 Other Token 7.x-1.1
100 Panels Mini panels 7.x-3.2
101 Panels Panel nodes 7.x-3.2
102 Panels Panels 7.x-3.2
103 Rules Rules 7.x-2.1
104 Rules Rules UI 7.x-2.1
105 Statistics Google Analytics 7.x-1.2
106 Taxonomy Taxonomy CSV import/export 7.x-5.10
107 User interface CKEditor 7.x-1.8
108 User interface jQuery Update 7.x-2.2
109 User interface Superfish 7.x-1.8
110 Views Better Exposed Filters 7.x-3.0-beta1
111 Views Draggableviews 7.x-2.0
112 Views Views 7.x-3.3
113 Views Views Bulk Operations 7.x-3.0-rc1
114 Views Views If Empty 7.x-1.x-dev
115 Views Views PHP 7.x-1.x-dev
116 Views Views Slideshow 7.x-3.0
117 Views Views Slideshow: Cycle 7.x-3.0
118 Views Views UI 7.x-3.3
119 Webform Webform 7.x-3.18
120 Workbench Workbench 7.x-1.1
121 XML sitemap XML sitemap 7.x-2.0-rc1
122 XML sitemap XML sitemap custom 7.x-2.0-rc1
123 XML sitemap XML sitemap engines 7.x-2.0-rc1
124 XML sitemap XML sitemap menu 7.x-2.0-rc1
125 XML sitemap XML sitemap node 7.x-2.0-rc1
126 XML sitemap XML sitemap taxonomy 7.x-2.0-rc1

merlinofchaos’s picture

I'm not sure it's possible to do anything useful with "menu link context". Because it's not a real entity.

Dave Reid’s picture

Project: Chaos Tool Suite (ctools) » XML sitemap
Version: 7.x-1.x-dev » 7.x-2.x-dev
Component: Plugins system » xmlsitemap_menu.module
Assigned: Unassigned » Dave Reid
Category: support » bug
Status: Postponed (maintainer needs more info) » Active

This is a bug related to xmlsitemap_menu_entity_info_alter().

Dave Reid’s picture

Status: Active » Fixed

This is now fixed with http://drupalcode.org/project/xmlsitemap.git/commit/3b71672 and should no longer cause a 500 error in CTools.

Anonymous’s picture

Dave Reid’s picture

Nope, this isn't needed to backport to D6, plus the linked issue seems to be triggered not by CTools (as well as needs more info).

Status: Fixed » Closed (fixed)

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