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: Advanced Categories no_results displayed in publish page

Status Resolved
Add-on / Version Advanced Categories 1.1.1
Severity
EE Version 7.3.5

tectrain

Sep 15, 2023

Hello,

I installed the advanced categories, activated the expressionengine.com license on your page after creating the account and was able to activate the plugin.

then i added a new filed of type advanced categories to the fieldgroup of my channel (also tried without fieldgroup by directly assigning) with the option to hide built-in categories. I also ensured that a category group has been selected for that channel.


but when i edit a channel entry the field only says “no_results” and the categories tab is still there.

i even tried checking and unchecking categories in the field settings, didn’t change anything.

#1

tectrain

Sep 15, 2023

i just noticed that $this->settings is empty in function display_field…but the base64 encoded settings are there in the field_settings field in the exp_channel_fields table

#2

tectrain

Sep 15, 2023

it’s the fault of: $data = $this->prepareDataForDisplay($data);

#3

tectrain

Sep 15, 2023

very strange….

/**
     * @return array
     */
    private function getEntryCategories(): array
    {
        $entryId = $this->content_id();

        if (!$entryId) {
            return [];
        }

        if ($cache = $this->cache->get('entryCategories')) {
            return $cache;
        }

print_r($this->settings); // looks good
        $entry = ee('Model')->get('ChannelEntry', $entryId)->first();
print_r($this->settings); // empty

        // Cast them to a string just so it's consistent with what is return from the saved JSON object in the custom field.
        $cats = array_map(function ($value) {
            return (string) $value;
        }, $entry->Categories->pluck('cat_id'));
#4

BoldMinded (Brian)

Sep 15, 2023

Comment has been marked private.

#5

tectrain

Sep 16, 2023

amazing thank you.

now the issue arises which i was afraid of reading the docs: do i need to assign categories to the field? i would like to be able to choose any category from the assigned category group with the help of the advanced categories field type.

#6

BoldMinded (Brian)

Sep 18, 2023

Yes, if you want to be able to assign categories from multiple groups, then you need to assign each group to the channel and select which categories to display in the AC field.

Login to reply