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: Upgraded from Publisher 2.3 to 2.4, now relations in a grid cannot be saved - “Base table or view

Status Resolved
Add-on / Version Publisher 2.4
Severity
EE Version 3.5.4

The Hatchery

Apr 06, 2017

Description:
Previously, everything was working great for Relations in these grids, as we were able to add / remove / and edit content without issue.

After upgrading to 2.4, saving content was no longer possible, as an error message is returned saying that the table no longer exists. Checking the DB, and it indeed is not there now.

This is happening in all places that use the ‘grid’ and ‘relation’, but I will use the ‘Leadership’ page as the reference—http://ecn_cms.hatcherydev.xyz/the-company/leadership/.

Detailed steps to reproduce the issue:
1. Visit the backend portion that controls the ‘Leadership’ page. http://ecncapitalcorp.dev/cp-login.php?/cp/publish/edit&filter_by_channel=13
2. Edit the ‘Leadership Bottom’ content—http://ecncapitalcorp.dev/cp-login.php?/cp/publish/edit/entry/129
3. Select entries for the applicable areas, and save as a ‘Published’ page (https://drive.google.com/a/thehatcherylabs.com/file/d/0B_x26jZYoOfIbk5mbnRka0NoUE0/view?usp=drivesdk)
4. Error returned: https://drive.google.com/a/thehatcherylabs.com/file/d/0B_x26jZYoOfIT19OeFd2TFRacGs/view?usp=drivesdk
SQLSTATE[42S02]: Base table or view not found: 1146 Table ‘ecn_cms.exp_assets_selections’ doesn’t exist:
SELECT * FROM (`exp_assets_selections`) WHERE `publisher_lang_id` = ‘1’ AND `entry_id` = ‘117’ AND `content_type` = ‘grid’ AND `publisher_status` = ‘open’

.htaccess:
user: ecn_guest
pass: ecn_guest

Please note:
Rolling back to Publisher 2.3 eliminates the error, and everything appears to work again.

 

#1

BoldMinded (Brian)

You say “Relations”, but that error indicates that its an Assets field, not a Relationship field, and it looks like its double prefixing the table name, e.g. “ecn_cms.exp_”.

The query run on that line is this, which is formatted correctly.

$selections = ee()->db
                    ->where($where)
                    ->where('publisher_status', Status::OPEN)
                    ->get('assets_selections');

It looks like EEs active record is screwing up the table prefix. Are you able to replicate this with a clean environment with only Publisher installed, or have you tried un-installing other add-ons 1 by 1 to see if the issue eventually goes away to pin point if there is a conflicting add-on?

#2

BoldMinded (Brian)

You can try adding a reset call before that query runs.

https://www.dropbox.com/s/2jows7pc1jajmra/Screenshot 2017-04-07 06.38.39.png?dl=0

#3

The Hatchery

The content is in the “Assets” section of “Structure”. The entry itself uses a “Grid” with “Relations” inside.

Testing other content pieces in “Assets” does yield the same error though, so you are correct, it is not dependent on the “Relations”.

Trying out that ee()->db->_reset_select(); does not work unfortunately.

I could disable ‘Structure’ to make the “Assets” section go away, but then none of the website will work as its reliant on Structure. The only two plugins that affect this content area are Structure and Publisher.

Any other ideas?

Thanks

#4

BoldMinded (Brian)

The exp_assets_selections table is specific to the Assets add-on, which you have installed, and is where the error is coming from.

The “Assets” section in Structure is irrelevant for this issue b/c it is just a facade for organizing content, it doesn’t change any behavior.

So whatever entry you’re editing must have an Assets fieldtype in it, correct? Can you take a screenshot of the entry you’re editing before you save it and get the error?

#5

The Hatchery

Comment has been marked private.

#6

BoldMinded (Brian)

Oh, I think I may know what the problem is. You don’t have Assets installed, but Publisher is still calling that file and running the query anyway. I should be able to fix this, but it may not be until early next week (busy weekend coming up).

#7

The Hatchery

Awesome, thanks for the assistance Brian.

I’ll rollback to version 2.3 for now until I hear back.

#8

BoldMinded (Brian)

Comment has been marked private.

#9

The Hatchery

Hi Brian,

Thanks for the files. Unfortunately that install does not work for us.

The screens now show a “Send for Approval” check box. When I save the entry updates, I receive this error message now:

Fatal error: Call to a member function getId() on a non-object in /var/www/ecn_cms/ecn_system/user/addons/publisher/Service/Url/Url.php on line 784

Any thoughts?

Thanks, Max

#10

BoldMinded (Brian)

Did you click the Update button on the modules page for Publisher?

#11

BoldMinded (Brian)

Version 2.4.2 is out, make sure you grab it.

Login to reply