No, you’re not doing anything wrong. The isFrontend() method was deprecated and has been removed -- I need to fix that. In the meantime, I think you can just add this to the snippet tag:
If that doesn’t work, replace line 423 of core/components/newspublisher/classes/newspublisher.class.php:
if (isset($this->props['forfrontend']) || $this->modx->isFrontend()) {
with this:
if (isset($this->props['forfrontend']) || $this->modx->context->get('key') != 'mgr') {
Thanks for such a quick reply! Both fix the error. You’re the man.
One more quick question. I hadn’t noticed this before, but it appears that it’s impossible to access the resource browser from TinyMCE when logged in on the front end without an active mgr session, is this correct? It appears I don’t even need to be logged in to both contexts as the same user, just as long as I’ve got an active mgr session the resource browser works on the front end. This is a bummer if true. Is there any way to access the browser without a manager session (for placing images, etc.), or with a single front-end login?
I haven’t tried it, but I suspect that you’re right. I think the fix would require changes to the TinyMCE code. I’m pretty sure there’s nothing I can do about it from the NewsPublisher end, though I could be wrong.
What, exactly is happening when it won’t work for you?
As an example, if I try to place an image using TinyMCE, I’ll get the image dialogue box as expected, but when I click on the browser icon (next to the image URL field) I get a new window just like I would if the resource browser was working, but instead of the browser appearing I get the mgr login screen. Really hoping this is fixable, but I wouldn’t have a clue where to start. Let me know what you think.
Try creating an Image TV and showing it in your NewsPublisher form. I use TinyMCE to handle that and it definitely works for me. If that doesn’t work for you, there’s probably something wrong with your TinyMCE configuration or possibly the filemanager_path System Setting (or something similar). I’m afraid I wouldn’t know where else to look.