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: Missing language status information in Entry Edit List

Status Resolved
Add-on / Version Publisher 3.2.3
Severity
EE Version 5.4

Studioweb

Jan 03, 2021

Hi, I’m missing the language labels in the status column. I’ve activated the setting ‘Detailed Translation Statuses’.

#1

BoldMinded (Brian)

Check your JS Console, there is probably an error in there. Also make sure you’re accessing the site at the same protocol as your config file. Eg http vs https. Check your network tab for the Ajax request, which might have an error in the response. This is most likely not a big but a configuration issue or another addon is throwing a JS error that is preventing Publisher from showing the statuses.

#2

Studioweb

No JS errors anymore (after disabling two older addons) and still no labels. The edit page itself does contain the Publisher dropdowns to switch to another language or draft.

#3

BoldMinded (Brian)

What about the network tab? What is the response of the Ajax request that is made?

#4

Studioweb

It was blocked by our index.php but still after this fix it doesn’t show anything.

For example: /?ACT=202&site_id=1&id=594577%2C593109%2C591904%2C591297%2C590744%2C587294%2C586194%2C586173%2C586172%2C584742%2C584743%2C584744%2C584779%2C584780%2C584781

Generates this JSON:

{”594577”:{”en”:{”translation”:”complete”,”has_newer_draft”:”y”},”nl”:{”translation”:”complete”,”has_newer_draft”:”n”}},”593109”:{”en”:{”translation”:”complete”,”has_newer_draft”:”n”},”nl”:{”translation”:”incomplete”,”has_newer_draft”:”n”}},”591904”:{”en”:{”translation”:”complete”,”has_newer_draft”:”n”},”nl”:{”translation”:”incomplete”,”has_newer_draft”:”n”}},”591297”:{”en”:{”translation”:”complete”,”has_newer_draft”:”n”},”nl”:{”translation”:”incomplete”,”has_newer_draft”:”n”}},”590744”:{”en”:{”translation”:”complete”,”has_newer_draft”:”n”},”nl”:{”translation”:”incomplete”,”has_newer_draft”:”n”}},”587294”:{”en”:{”translation”:”complete”,”has_newer_draft”:”n”},”nl”:{”translation”:”incomplete”,”has_newer_draft”:”n”}},”586194”:{”en”:{”translation”:”complete”,”has_newer_draft”:”n”},”nl”:{”translation”:”incomplete”,”has_newer_draft”:”n”}},”586173”:{”en”:{”translation”:”complete”,”has_newer_draft”:”n”},”nl”:{”translation”:”incomplete”,”has_newer_draft”:”n”}},”586172”:{”en”:{”translation”:”complete”,”has_newer_draft”:”n”},”nl”:{”translation”:”incomplete”,”has_newer_draft”:”n”}},”584742”:{”en”:{”translation”:”complete”,”has_newer_draft”:”n”},”nl”:{”translation”:”incomplete”,”has_newer_draft”:”n”}},”584743”:{”en”:{”translation”:”complete”,”has_newer_draft”:”n”},”nl”:{”translation”:”incomplete”,”has_newer_draft”:”n”}},”584744”:{”en”:{”translation”:”complete”,”has_newer_draft”:”n”},”nl”:{”translation”:”incomplete”,”has_newer_draft”:”n”}},”584779”:{”en”:{”translation”:”complete”,”has_newer_draft”:”n”},”nl”:{”translation”:”incomplete”,”has_newer_draft”:”n”}},”584780”:{”en”:{”translation”:”complete”,”has_newer_draft”:”n”},”nl”:{”translation”:”incomplete”,”has_newer_draft”:”n”}},”584781”:{”en”:{”translation”:”complete”,”has_newer_draft”:”n”},”nl”:{”translation”:”incomplete”,”has_newer_draft”:”n”}}}

#5

BoldMinded (Brian)

Find the publisher.edit.js file, and go to line 120 and change the whole isInt function to this:

var isInt = function (value) {
        return !isNaN(value) && parseInt(Number(value)) && !isNaN(parseInt(value, 10));
    };
#6

Studioweb

This fixed the problem but only in combination with the modification on line 1560 in ext.publisher.php:

/**
     * @return string
     */
    public function cp_js_end()
    {
        $scripts = [];

        // If another extension shares the same hook
        if (ee()->extensions->last_call !== false) {
            //$scripts[] = ee()->extensions->last_call;
        }

because the JS return content started with ‘Array’ :

Arrayvar publisherAppendableMenuItems = {"cp\/categories":{"Phrases":"index.php?\/cp\/addons\/settings\/publisher\/manage\/phrases","Category Translations":"index.php?\
#7

BoldMinded (Brian)

Then that means another add-on is not properly using the cp_js_end hook, and removing the JS that Publisher is attempting to output. The change I sent definitely fixes the issue locally… you’ll need to track down whatever other add-on uses the cp_js_end hook and fix it, most likely by adding the same conditional line to it’s function call:

if (ee()->extensions->last_call !== false) {
        $scripts[] = ee()->extensions->last_call;
 }
#8

BoldMinded (Brian)

FYI, you don’t need to mark every comment as private. It means other people searching for similar issues can’t see your responses. Private comments are intended only for when a comment contains sensitive information.

Login to reply