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: PHP Errors for other member groups (Control Panel)

Status Resolved
Add-on / Version Publisher 1.5.4
Severity Blocker
EE Version 2.9.0

Peter Lewis

Dec 12, 2014

Hi, getting PHP errors which are making the Control Panel interface unusable (edit/publish entries and Publisher Phrases).

This only occures for a different member group.

See attached.

I’ll continue tracking it down, but the phrases issue is that no languages variables exist for short_name and long_name which are referenced in the phrase/edit_form.php:
<?php echo $this->publisher_helper->get_flag($languages[$lang_id][‘short_name’], $languages[$lang_id][‘long_name’]); ?>

Not sure if that’s the same issue encountered in the publish form, where it may be trying to get the button label, but the error message is different, so don’t think so.

Will try updating Publisher next…

Thanks,

Peter

#1

Peter Lewis

/publisher/views/toolbar.php

<?php foreach ($languages as $lang_id => $language): ?>
                        <option value="<?php echo $lang_id ?>" <?php echo ($lang_id == $selected_language ? 'selected="selected"' : '') ?>><?php echo $language['long_name'] ?></option>
                    <?php endforeach; ?>

$languages is undefined. And as mentioned above, the other error there is also related to the variable not defined.

#2

Peter Lewis

Case closed.

The hook in Publisher_helper line 359 allows third parties to modify $language_options and I had Language Editor for Publisher installed (which allows for access control over the specific languages). It seems to not work with the new version of EE (or maybe PHP), the result is it clears your variable - might be worth adding in checks to see if the variable is destroyed within the hook, and if so, reset it back to the original to prevent version issues like this - especially as it then introduces PHP errors in your module and if it ends up being your time spent trying to track down a bug in someone elses outdated code.

https://devot-ee.com/add-ons/language-editor-for-publisher

Login to reply