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: Publisher:Category

Status Resolved
Add-on / Version Publisher 3.9.3
Severity
EE Version 7.2.17

Lincoln Gbenga Olagbaju

May 03, 2023

Hi,
  updated EE to the latest version (7.2.17) did the same with Publisher (3.9.3) after that, a lot of pages are throwing this error
Unknown model “Site”. Used in model “publisher:Category” for a relationship called “Site”.

Attached is the Stack Trace

#1

BoldMinded (Brian)

What action are you taking when this happens? Is this happening when saving something? Viewing a page on the front-end or backend? Thanks for including the error message but I’m unable to replicate this so I need a little more direction. If this is happening on the front-end does it happen on every page or just some pages? What is unique about those pages? Have you done anything to debug it yourself, like remove some template tags until it starts working to narrow down the issue?

#2

BoldMinded (Brian)

Actually I think I see the issue. They changed something in the core model files in the last update. Can you test this for me… open the publisher/Model/Category_EE7.php file and add this to the array on line 51 just below “// Native”

'Site' => array(
            'type' => 'belongsTo'
        ),

Should look like this:

https://capture.dropbox.com/N8PWop86Prycnfjx

#3

Kevin Chatel

Hi Brian, I’m also getting this error. I’ve tried your little text change and its still there.

// Native
        'Site' => array(
            'type' => 'belongsTo'
        ),
        'CategoryGroup' => [
            'type' => 'belongsTo'
        ],

I update EE from 7.2.15 » 7.2.17 Updated Publisher as well to the latest on the site. Thanks Regards Kevin

#4

Hop Studios

We’re seeing this same issue, Publisher v3.9.3, php8.1, EE v7.2.17 Issue is on the frontend.

When logged in as superadmin: Exception Caught Unknown model “Site”. Used in model “publisher:Category” for a relationship called “Site”. ee/ExpressionEngine/Service/Model/RelationGraph.php:245

When not logged in (viewing the same page as above): Error Caught Call to a member function getAllRoles() on null App.php:195

Condensed the template down to just this tag to throw the error: {exp:channel:categories channel=”whats_new” limit=”1”} <li>{category_name}</li> {/exp:channel:categories}

#5

Hop Studios

Sorry, didn’t wrap that tag in a code block. Hopefully this comes through properly:

{exp:channel:categories channel="whats_new" limit="1"}
    <li><a href="http://{path=blog/type/category/{exp:publisher:translate_category">{category_name}</a></li>
{/exp:channel:categories}
#6

Hop Studios

I don’t know why that code block keeps reformatting. Once last try, I’m sure you get the gist of it if this doesn’t work either.

'{path=blog/type/category/{exp:publisher:translate_category lang_id="1" cat_id="{category_id}" return="cat_url_title"}}'
#7

BoldMinded (Brian)

Thanks for the code samples, I’ll try to get you a fix on Monday.

#8

BoldMinded (Brian)

I sent you all an email with a link to the download of a new build that should fix it.

#9

Hop Studios

That fixed this issue, thank you!

#10

BoldMinded (Brian)

Good to hear. I’ll go ahead and close this ticket out.

Login to reply