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: Assets Error

Status Resolved
Add-on / Version Publisher
Severity Critical
EE Version 24

GIGA

May 21, 2013

Hello,

im using Publisher with Structure + Assets

after i saved the entry with Assets fieldset inside i got this error:

——-

Error Number: 1054

Unknown column ‘ae.publisher_lang_id’ in ‘where clause’

SELECT DISTINCT a.* FROM exp_assets_files AS a INNER JOIN exp_assets_folders AS af ON af.folder_id = a.folder_id INNER JOIN exp_assets_selections AS ae ON ae.file_id = a.file_id WHERE ae.entry_id = “2” AND ae.field_id = “3” AND ae.col_id = “3” AND ae.row_id = “23” AND ae.is_draft = 0 AND ae.publisher_lang_id = 1 AND ae.publisher_status = “open” ORDER BY ae.sort_order

Filename: third_party/publisher/models/publisher_query.php

Line Number: 74

——

#1

BoldMinded (Brian)

hi there. Did you click the link at the bottom of the settings page to make sure the updates to Assets were made? Also, what version are you running?

#2

Dimitri Neufeld

ExpressionEngine 2.5.5 Assets 2.1.3

Clicking at “Update P&T add-ons” in Settings causes this:


Error Number: 1060

Duplicate column name ‘selection_id’

ALTER TABLE exp_assets_selections ADD selection_id int(4) UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY AFTER file_id

Filename: third_party/publisher/libraries/Publisher/fieldtypes/Publisher_assets.php

Line Number: 112

#3

BoldMinded (Brian)

What version of Publisher?

#4

Dimitri Neufeld

0.98.7

#5

BoldMinded (Brian)

Did you install Publisher, then Assets, or Assets then Publisher?

#6

Dimitri Neufeld

Publisher then Assets

#7

BoldMinded (Brian)

Can you uninstall then reinstall Assets without losing data? I just uninstalled and reinstalled it without any errors and was able to save an entry without errors too.

#8

Dimitri Neufeld

Din’t work for me

additionally i got this issue in publisher settings:


A PHP Error was encountered Severity: Notice Message: Array to string conversion Filename: fieldtypes/Select.php

Line Number: 61

#9

BoldMinded (Brian)

Crap on both accounts. Can you do me a favor and take a screenshot of your settings page? Also, if you could take a screenshot of your exp_publisher_settings table like this it would help immensely too. I’m using Sequel Pro in this instance to view the database. https://www.evernote.com/shard/s9/sh/8e711442-001c-4654-9262-10f4dd38b1a5/48077f7457f5d565e8798286d78d387d

#10

BoldMinded (Brian)

What version of PHP and MySQL are you using?

#11

BoldMinded (Brian)

Have you seen this thread? Sounds like you two are having the exact same errors… none of which I can reproduce :(

http://boldminded.com/support/ticket/460

#12

Dimitri Neufeld

Yes i see its exactly the issue.

recently i’m using MAMP with PHP 5.4.10 on local machine to develop the project.

before as the site was on the another server i could not see any similar problems with add-ons running together with Publisher.

it could be a server problem.

#13

Dimitri Neufeld

No luck on my another server (PHP 5.3.10 / MySQL 5.5.28)

here is the screenshot for the settings:

https://www.evernote.com/shard/s220/sh/14c02710-7922-45bc-88ef-06352e8c990f/b40441549f9f74a4e5cd5c68777a884c

#14

BoldMinded (Brian)

I’m using MAMP with 5.3.20 and don’t see similar errors, and the settings table looks fine. This is so weird.

#15

BoldMinded (Brian)

On a second computer running 5.3.6 and MySQL 5.5.9 I still don’t see the same Assets error. I’ve installed and uninstalled multiple times.

Have you tried an EE installation that contains only Assets and Publisher? Maybe another add-on is causing an issue?

Are the publisher_lang_id and publisher_status columns in the exp_assets_selections table when the error occurs?

#16

Dimitri Neufeld

Definitely there is something wrong with assets. I also tried to install an older version 2.1.2, without luck. To test I installed ExpressionEngine fresh only with Publisher and Assets without any another plugins.

I deactivate the Draft Mode in Publisher

Then the error occurs if i create the new entry with an Assets field.

Error Number: 1054

Unknown column ‘ae.publisher_lang_id’ in ‘where clause’

SELECT DISTINCT a.source_type, a.folder_id, a.file_name, a.file_id, af.source_id, af.filedir_id FROM exp_assets_files AS a INNER JOIN exp_assets_selections AS ae ON ae.file_id = a.file_id INNER JOIN exp_assets_folders AS af ON af.folder_id = a.folder_id WHERE ae.entry_id = ‘1’ AND ae.field_id = ‘1’ AND ae.publisher_lang_id = 1 AND ae.publisher_status = “open” ORDER BY ae.sort_order

Filename: third_party/publisher/models/publisher_query.php

Line Number: 74

#17

BoldMinded (Brian)

If you look at the exp_assets_selections table though, does it have a publisher_lang_id column in it?

#18

Dimitri Neufeld

No, its empty

https://www.evernote.com/shard/s220/sh/458978f9-0d16-42d3-84f7-7d20b6800bbb/3b15ba01886b0b013431f489ca93f943

#19

BoldMinded (Brian)

Ok, in the publisher/libraries/Publisher/fieldtypes/Publisher_assets.php file, line 107 or so you should see this:

public function install()
    {
        if (ee()->db->table_exists('assets_selections') AND ! ee()->db->field_exists('publisher_lang_id', 'assets_selections')) 
        {
            // Create a unique ID column since Assets does not have one, it makes post_save easier for Publisher.
            ee()->db->query("ALTER TABLE `". ee()->db->dbprefix ."assets_selections` ADD `selection_id` int(4) UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY AFTER `file_id`");
            // Move it to the front.
            ee()->db->query("ALTER TABLE `". ee()->db->dbprefix ."assets_selections` MODIFY COLUMN `file_id` int(10) AFTER `selection_id`");
            ee()->db->query("ALTER TABLE `". ee()->db->dbprefix ."assets_selections` ADD `publisher_lang_id` int(4) NOT NULL DEFAULT  ". ee()->publisher_lib->default_lang_id ." AFTER `entry_id`");
            ee()->db->query("ALTER TABLE `". ee()->db->dbprefix ."assets_selections` ADD `publisher_status` varchar(24) NULL DEFAULT '". PUBLISHER_STATUS_OPEN ."' AFTER `publisher_lang_id`");
        }
    }

Make sure that method is exactly as I pasted above, then uninstall Assets and re-install it.

#20

Dimitri Neufeld

Ok the code you passed is little bit different i replaced it and i got this:

A Database Error Occurred
Error Number: 1054

Unknown column 'site_pages' in 'field list'

UPDATE `exp_sites` SET `site_pages` = 'YToxOntpOjE7YTozOntzOjM6InVybCI7czowOiIiO3M6NDoidXJpcyI7YToxOntpOjM7czo3OiIvaW5pY2lvIjt9czo5OiJ0ZW1wbGF0ZXMiO2E6MTp7aTozO3M6MToiMSI7fX19' WHERE site_id = '1'

Filename: third_party/structure/mod.structure.php

Line Number: 3160

In Structure, above the Page structure i got this:

A PHP Error was encountered
Severity: Notice

Message: Undefined offset: 3

Filename: views/index.php

Line Number: 45
#21

BoldMinded (Brian)

Sent you the 0.98.8 build to try. That error though… I don’t see how the revised Assets install method would cause that Structure error.

#22

BoldMinded (Brian)

Can you email me at support at boldminded dot com? The email address you provided in the ticket bounced.

#23

BoldMinded (Brian)

I got a bounce from the new address you sent too.

#24

Dimitri Neufeld

Good, that build has fixed the problem, can not note any errors anymore.

Thank you.

Login to reply