Publisher does not support the Fluid field type. Please do not contact asking when support will be available.

If you purchased an add-on from expressionengine.com, be sure to visit boldminded.com/claim to add the license to your account here on boldminded.com.

Ticket: Grid field causing “Unknown column ‘title’ in ‘field list’”

Status Resolved
Add-on / Version Publisher 1.1.2
Severity Critical
EE Version 2.7.3

Christopher Imrie

Dec 11, 2013

I’ve added a Grid fieldtype to an existing channel. It consists of two text input columns.

When clicking publish on a new or existing entry, a DB error is produced by the publisher_model.php:

Error Number: 1054

Unknown column 'title' in 'field list'

INSERT INTO `exp_publisher_data` (`site_id`, `entry_id`, `publisher_lang_id`, `publisher_status`, `publisher_approval_status`, `title`, `channel_id`, `field_id_5`, `field_id_9`, `field_id_10`, `field_id_12`) VALUES ('1', '19', '1', 'open', 'approved', 'Symmetry', '4', 'Some content', '

Some more here

', 'Yes', ' ')
Filename: third_party/publisher/models/publisher_model.php

Line Number: 444
#1

BoldMinded (Brian)

You’re using Grid with a column named “title” aren’t you? 😊 Here is the fix:

diff --git a/third_party/publisher/libraries/Publisher/Publisher_lib.php b/third_party/publisher/libraries/Publisher/Publisher_lib.php
index 2970c92316721e2ef94e2b129d370340e759fa01..906ac9909167e528ac9bc1bbfaa58baa5650c35d 100644
--- a/third_party/publisher/libraries/Publisher/Publisher_lib.php
+++ b/third_party/publisher/libraries/Publisher/Publisher_lib.php
@@ -206,7 +206,7 @@ class Publisher_lib {
         ee()->publisher_entry->add_column($this->field_name, true);
 
         // Make sure it exists and its installed.
-        if (is_callable(array($this->field_type_obj, $method)) && $this->field_type_obj->is_installed($this->field_type))
+        if ($this->field_name != 'title' && is_callable(array($this->field_type_obj, $method)) && $this->field_type_obj->is_installed($this->field_type))
         {
             $this->parameters = call_user_func_array(array($this->field_type_obj, $method), $this->parameters);
#2

Christopher Imrie

Works great. Thanks.

I notice that the Grid fields dont respond to the text direction changes (I’m working with a part arabic site). Would your addon be able to intercept the language direction being set and override it like it does with the standard input fields?

#3

BoldMinded (Brian)

Dang, I forgot about that part. I’ll have to look into how to fix that. I assume you mean in the CP?

#4

Christopher Imrie

Yes, in the CP.

Apart from this little Grid text direction issue (and the Editor fix I brought up with Devdemon a while back) Publisher has worked brilliantly for us. Really nice work.

#5

BoldMinded (Brian)

Good to hear! I’ll take a peak at this hopefully this week, or early next week.

Login to reply