EE4 compatibility updates:

  • Publisher is EE4 and EE5 compatible, but it does not currently support the Fluid field (it's in the works).
  • Reel is EE4 and EE5 compatible, but it does not currently support the Fluid field.

Ticket: Categories not parsed in front end and translation status columns are not displaying properly

Status Client Wait
Add-on / Version Publisher 2.10.5
Severity
EE Version 4.3.7

Hop Studios

7 days ago

Hello Brian,

I am having problems with custom category fields post EE4 upgrade.

There is a category Resources (id: 288) that has a custom field called cat_navigation (all custom fields are not working I’m just using this one as example)
https://staging.lucistrust.org/testing
When I go to the EE native category page, none of the custom fields are displaying. I suspect ‘custom_field_modify_data’ has something to do with this.

The second issue is the one you helped addressed in the other ticket. The Translation status is now showing but the statuses. I am attaching a screenshot to show the before and after.

#1

BoldMinded (Brian)

6 days ago

Comment has been marked private.

#2

BoldMinded (Brian)

6 days ago

As for the translation statuses, those were updated in Publisher 2.something to be more accurate. It won’t show that the translation is complete until all the custom fields have a value assigned to them.

#3

Hop Studios

6 days ago

Yes that’s the weird part.

After I ran

UPDATE exp_extensions SET enabled='n' WHERE class="Publisher_ext" AND hook="custom_field_modify_data"

The data will show in https://staging.lucistrust.org/admin.php?/cp/categories/edit/2/288 but not https://staging.lucistrust.org/admin.php?/cp/addons/settings/publisher/manage/categories/translations/288
So the data is definitely there, but maybe during the update the conversion wasn’t done right (I don’t know how much the data structure has changed in terms of how Publisher deal with category fields)

My update process was
Publisher in 1.7.5 already
Playa Matrix importer
Update to EE3 (the category fields were already not displaying, | thought it was an EE native issue so I continued)
Update to EE4 (the category fields were still not showing any data)

#4

BoldMinded (Brian)

6 days ago

The custom_field_modify_data hook isn’t used for categories, its only used in channel entry fields.

#5

Hop Studios

6 days ago

That’s what I thought judging by the hook name but setting the extension to be disabled make the saved data appear: https://staging.lucistrust.org/admin.php?/cp/categories/edit/2/288

#6

BoldMinded (Brian)

6 days ago

Not sure how that is happening b/c I load up a category edit page locally and the hook isn’t getting called at all.

/cp/categories/edit/2/288 isn’t a Publisher page, and Publisher doesn’t try to modify anything on that page, it’s irrelevant to Publisher. Publisher manages translations at /cp/addons/settings/publisher/manage/categories/translations/288

#7

Hop Studios

6 days ago

Hello Brian,

It is the Show content fallback (CP). When it’s disabled, the EE native category edit page doesn’t show the category field data (same on my fresh installation)
https://staging.lucistrust.org/admin.php?/cp/addons/settings/publisher/general/display
And I discovered that Show content fallback (FE) doesn’t work for cataegory
Observe the last line (New category field:):
https://staging.lucistrust.org/testing
https://staging.lucistrust.org/fr/testing

1. Can you please let me know the Publisher 2’s category database structure? I think I need to port the legacy category fields into the new structure because it is just not working atm.
2. Can you let me know which files decide if the translation status should be lit for category fields? I’d like to make it so that only the required category fields matter.
3. Can you investigate in your fresh install to see if you can recreate the following error(bug)?
Step 1, Create 2 category groups
Step 2, Create a category field in each category group
Step 3, Create a category in each category group
Step 4, Go to the publisher category and select either category and hit edit
Step 5, See if both category fields show up even though they were created in different category group

Thanks!

#8

BoldMinded (Brian)

6 days ago

#1 - publisher_categories contains all the translations, and the custom field values are all in a JSON object in the custom_fields column of that table, and publisher_category_posts is where the cat to entry assignments are saved, just like the native category_posts table.

I’ll look into the rest of your last comment sometime over the weekend.

#9

BoldMinded (Brian)

5 days ago

#2 - In order for a translation to be complete, which changes those language status icons/pips to green, every category field (title, desc, image, and custom fields) must have a value.

#3 - I can replicate this. Yes it looks like all custom category fields are showing when editing a category, regardless of the group it is in. I’ll look into fixing this.

#10

BoldMinded (Brian)

4 days ago

Comment has been marked private.

#11

Hop Studios

2 days ago

Comment has been marked private.

#12

BoldMinded (Brian)

2 days ago

I’ll take a look at that new issue in a couple days… traveling for work this week.

2. No longer an issue, I put in some small modifications that suit the client’s need (only fade the status when no custom fields are entered or any required fields are not entered)

What sort of changes did you make? Would you mind sharing?

#13

BoldMinded (Brian)

2 days ago

Just looked into the category issue you described with the screenshot and was not able to replicate. Would you be able to attach a video of you re-creating the issue to make sure I’m following the steps exactly?

#14

Hop Studios

2 days ago

Hello Brian,

I will share the code when this last bit of issues are cleared so everything is clear.

I’ve attached the screencast. Please let me know if it’s not clear.

#15

BoldMinded (Brian)

1 day ago

I don’t see a screencast. Did you forget to paste the url? smile

#16

Hop Studios

21 hours ago

Comment has been marked private.

#17

BoldMinded (Brian)

18 hours ago

I took the same steps you did as shown in the video and was not able to replicate. I tried logging into your CP to see the Publisher settings, but the login isn’t working.

I haven’t seen this happen before and it feels like something is up with your environment, otherwise I’d be able to replicate or would have probably gotten a similar report already b/c this code has not changed for quite awhile. Line 354 of Controllers/Manage/Categories.php is where the save is initiated, it seems like something in the foreach loops is missing, thus causing it to insert an empty row, almost like the page contains extra form fields with null values, which are added to the foreach loop. Are you able to debug those lines of code to make sure $languageId, $status, $groupId etc are all set before it tries to call ->save()?

Login to reply

Contact

For add-on support, please use the Support section. General inquries and pre-sale questions can be sent to support@boldminded.com.