Front-end Document Management - MODX Community Forums <![CDATA[newspublisher: Treatment of value 0 in number TV]]>
(In my use case we ask for a recommended minimum age for an event. If the editor says 0, then it's for all ages, if she gives no information, we assume it's for adults only.)

How can this be fixed?]]> Wed, 06 Feb 2019 03:05:57 +0000
<![CDATA[Help getting elFinder working with NewsPublisher]]>
Here is what I have for the elFinderConnector snippet call:

[[!npElFinderConnector? &browserStartPath=`/images` &browserStartURL=`/images` &browserBasePath=`/home/www/images` &browserBaseURL=`/home/www/images`]] 

Here is the error when viewing the npElFinderConnector page:
{"error":["errConf","errNoVolumes"],"debug":["Driver \"elFinderVolumeLocalFileSystem\" : Root folder does not exist."]}

This is the error when trying to insert an image through the content rte field.
Invalid backend configuration.
Readable volumes not available.

Additional question: are npElFinderConnector and npElFinder pages supposed to be child pages of the page that has the NP snippet?

NP snippet call has &initfilebrowser=`1` setting.

MODX Revolution 2.6.5-pl
NP 3.0.4 pl

]]> Fri, 14 Dec 2018 05:45:29 +0000
<![CDATA[Hoverhelp does not work in NewsPublisher 3?]]> Thu, 30 Nov 2017 10:56:31 +0000 <![CDATA[elFinder in NewsPublisher Not Selecting Images Correctly]]>
elfinder.min.js:9 TypeError: parent.tinymce.activeEditor.windowManager.getParams(...).setUrl is not a function
    at Object.mySubmit (
    at i.commands.getfile.getFileCallback [as callback] (
    at Object.<anonymous> (
    at i (
    at Object.fireWith [as resolveWith] (
    at Object.e.(anonymous function) [as resolve] (
    at i.commands.getfile.exec (
    at i.exec (
    at Array.<anonymous> (
    at i.trigger (

I've been mucking about this extra doing some pretty serious customizing but I can't think I did anything that would cause an issue.

Also, I am not seeing a way to dismiss or close the elFinder window in the view.]]> Wed, 04 Oct 2017 05:34:52 +0000
<![CDATA[NewsPub button.css]]> NP 3.0.4

The button.css ’sheet that NP is adding to the head tag is using a relative url which is throwing a SSL browser warning.

I have configured the site to use absolute https urls which works fine except with this one NP asset.

I need to either force an absolute url or stop NP from loading the file.]]> Sun, 01 Oct 2017 04:47:08 +0000
<![CDATA[Updated to 2.5.2 Newspublisher seems to hang on TinyMCE]]>
Upgraded all Extras in 2.2.16 (Newspublisher was at 1.3 and didn't have an update button)
Updated to 2.3
Updated to 2.4 (couldn't login until I disabled the Captcha plugin)
Updated to 2.5
Updated to 2.5.2

Attempted a front end edit by:

Logging in to the front end in another browser
I was successfully directed to my custom page that I can edit
Clicked the Edit button
Got an HTTP 500 Error
Checked to see if there was an updated version of Newspublisher
Installed new version (2.1.0)
Still the same problem (TinyMCE is at 4.3.4 as requried for this version of MODX)

Checked the server logs and get this error:

[01-Jan-2017 15:58:53 America/New_York] PHP Fatal error:  Call to a member function addJavascript() on a non-object in M:\wamp\www\crom\core\components\tinymce\tinymce.class.php on line 151

[01-Jan-2017 15:58:53 America/New_York] PHP Stack trace:

[01-Jan-2017 15:58:53 America/New_York] PHP   1. {main}() M:\wamp\www\crom\index.php:0

[01-Jan-2017 15:58:53 America/New_York] PHP   2. modX->handleRequest() M:\wamp\www\crom\index.php:57

[01-Jan-2017 15:58:53 America/New_York] PHP   3. modRequest->handleRequest() M:\wamp\www\crom\core\model\modx\modx.class.php:1399

[01-Jan-2017 15:58:53 America/New_York] PHP   4. modRequest->prepareResponse() M:\wamp\www\crom\core\model\modx\modrequest.class.php:121

[01-Jan-2017 15:58:53 America/New_York] PHP   5. modResponse->outputContent() M:\wamp\www\crom\core\model\modx\modrequest.class.php:137

[01-Jan-2017 15:58:53 America/New_York] PHP   6. modParser->processElementTags() M:\wamp\www\crom\core\model\modx\modresponse.class.php:69

[01-Jan-2017 15:58:53 America/New_York] PHP   7. modParser->processTag() M:\wamp\www\crom\core\model\modx\modparser.class.php:250

[01-Jan-2017 15:58:53 America/New_York] PHP   8. modScript->process() M:\wamp\www\crom\core\model\modx\modparser.class.php:521

[01-Jan-2017 15:58:53 America/New_York] PHP   9. include() M:\wamp\www\crom\core\model\modx\modscript.class.php:70

[01-Jan-2017 15:58:53 America/New_York] PHP  10. Newspublisher->init() M:\wamp\www\crom\core\cache\includes\elements\modsnippet\29.include.cache.php:148

[01-Jan-2017 15:58:53 America/New_York] PHP  11. TinyMCE->initialize() M:\wamp\www\crom\core\components\newspublisher\model\newspublisher\newspublisher.class.php:590

Line 151 of tinymce.class.php is:


Line 590 of newspublisher.class.php is:


Before that there is this:

                require_once $tinyPath.'tinymce.class.php';
                $tiny = new TinyMCE($this->modx, $tinyproperties);

                $tinyproperties['language'] =
                $tinyproperties['frontend'] = true;
                $tinyproperties['cleanup'] = true; /* prevents "bogus" bug */
                $tinyproperties['width'] = empty ($this->props['tinywidth'] )
                    ? '95%'
                    : $this->props['tinywidth'];
                $tinyproperties['height'] = empty ($this->props['tinyheight'])
                    ? '400px'
                    : $this->props['tinyheight'];
                $tinyproperties['resource'] = $this->resource;

In my "Edit" template I have the following Newspublisher code:

&template=`Member Profile`

My edit button code is:

[[!NpEditThisButton? &np_id=`22`]]

Not being a programmer I'm not sure what the issue is save perhaps some sort of incompatiblilty with the latest TinyMCE?]]> Mon, 02 Jan 2017 01:18:04 +0000
<![CDATA[ADDITION/UPDATE: Pre-set field value for NewsPublisher]]>
I've just made a small change to my NewsPublisher snippet that could be of use to somebody - being able to pre-set a field value in the [[!NewsPublisher]] call:


in the relevant field tpl:
<textarea rows="[[+npx.rows]]" cols="[[+npx.cols]]" class="[[+npx.class]] form-control" name="[[+npx.fieldName]]" id="np-[[+npx.fieldName]]">

in the snippet (around line 155):
/*set placeholder content values*/
    $show = explode(",",$scriptProperties['show']);
    foreach($show as $field){
            $modx->toPlaceholder(''.$field.'Value', $scriptProperties[''.$field.'Value'], $np_prefix);

Wasn't sure where else to put it - but figured it might be useful...]]> Tue, 06 Dec 2016 09:15:44 +0000
<![CDATA[newspublisher: can create pages but not edit (You do not have permission to view this document)]]>
Can anyone help me with NewsPublisher and ACLs? I get »You do not have permission to view this document« when I try to edit an existing resource that I created as the same user.

From the start:

Goal: A list of users should be able to create and edit their own pages via Newspublisher (without manager access). These pages should be protected from the public.

I set up a new User group "VeranstalterGruppe" and a new Role "VeranstalterRolle" (authority 50). The respective users are in this group and have this role.

I created the resource group "Veranstalterseiten" and put all relevant pages along with the Newspublisher page in it.

I set up a new access policy "Veranstalter" using the policy template "NewsPublisherPolicyTemplate" so that it is basically identical to NewsPublisherEditor provided with NewsPublisher.

For the user group "Veranstalter" I setup context access for mgr and web each with minimal role "VeranstalterRolle - 50" and access policy "Veranstalter". They also have resource group access to the resource group "Veranstalterseiten", minimum role "VeranstalterRolle - 50" and access policy "Resource" for both contexts web and mgr. (No other permissions were set)

I also created a new template with [[!NpEditThisButton? &debug=`1` &np_id=`1099`]]. The Newspublisher page (id 1099) has this snippet call:


What works: I can login as a user from the group "VeranstalterGruppe" and create new subpages with the Newspublisher page. They are put in the resource group "Veranstalterseiten" as expected and are indeed not visible to the public. As the creator of the page I can view the page and see the little "Edit this page" button in the bottom corner. So far so good.

But when I press this edit-button and I get to the Newspublisher page, I get the error message "You do not have permission to view this document" and the form is not displayed, which to me is counterintuitive. I CAN open the Newspublisher page (and thus create new pages) and I CAN view the page I just created. I just cannot edit it. Why is that?

When logged in as administrator super user, editing existing pages works.

So where did I make a mistake?

Any help helps!
Jörg]]> Tue, 08 Nov 2016 01:04:34 +0000
<![CDATA[TVs not attached to template]]> NewsPublisher 2.1.0
TinymceWrapper 2.3.1

I have several front-end NP forms that work in conjunction with TinyMagicPublisher (part of the TinymceWrapper Extra).

Each form uses a variety of TVs with several TVs shared across multiple forms. With one glaring exception all the forms work beautifully.

The one problem form throws the NP error: "You are trying to use a TV that is not attached to this template". The message shows a total of 6 TVs. This is incorrect. I have verified numerous times that all 6 TVs are in fact assigned to that particular Template as configured under the Template Access tab of each of the TVs.

What's stranger is that the same 6 TVs are also assigned to a different Template, a Template which is nearly identical to the one that doesn't work, yet that one functions perfectly.

The only possible cause I can think of is that some of the 6 TVs had different names at one point. When the names were changed I updated all the relevant Templates and Chunks where the TV names where specified. But if this is in fact the cause I would think all the Templates where those TVs are used would fail the same, not just one of them.

If that's not the cause then maybe the db got twisted about somehow. I don't know.

I'm at my wits end. I just can't spot where the problem lies. Does anyone have any idea?


]]> Thu, 14 Jul 2016 04:47:15 +0000
<![CDATA[just a quick troubleshooting NewsPublisher tip]]>
had my edit button failing silently, checked permissions etc, it still didn't update but WOULD delete and duplicate.

1. In chunk NPOuterTpl I added


with no conditionals.

This ended up showing me my error which was "content missing"

2. You have to set the &required field in your NewsPublisher call or it will default to `pagetitle,content`

I set it to

since thats all I need and bam it works.

zillions of thanks to @BobRay for awesome work.]]> Thu, 17 Dec 2015 01:54:35 +0000
<![CDATA[QM is a Blank Page in Front End Editor]]>
<body ondragstart="return false" style="display: none;">

Changing to display:block makes the editor visible. Any ideas on why/what is causing this setting?

Have re-installed modx including qm multiple times without resolution.]]> Thu, 01 Oct 2015 11:30:30 +0000
<![CDATA[Newspublisher: setup security/permissions]]> It's a website about a sportsclub, and the intention is that each coach of the different teams can create a report of each game his team played.
I'm using Newspublisher to let them create the reports. That is working as far as I'm logged in as administrator.
The newspublisher call is on resource 40 and the new created resources are under resource 41 (= a containernamed 'Reports')

Now comes the hard part for me.
I just can't figure out the whole security system to let each coach login, redirect to the newspublisher resource and let him create/edit his reports.
The only thing I must have is coach login as web-user, but I find the security system to complicated as a beginner. Don't know how to figure this out and am afraid to mess things up. I'v looked in the forums, but can't find a step-by-step tutorial.

Anyone can help me and explain how I have to do this ?]]> Tue, 28 Jul 2015 12:52:40 +0000
<![CDATA[Newspublisher doesn't create new resource]]> My Newspublisher call is on resource with ID=40 :

As you can see I have a lot of template variables.
The new resource must be created under resource with ID=41, and must use template with ID=7.
The variables are assigned to the template with ID=7.

When I go to the Newspublisher resource, it shows the form, and I can fill in all the fields/variables, but when I hit "Submit" it comes back to the form and nothing is created.

When I leave out the &show line in the Newspublisher call, I get the standard form in Newspublisher and the resource is created at the right place with the right template!
But as soon as I use &show it goes wrong. And I need the &show to use my template variables.

Anyone can help ?

Modx version : 2.3.3
Newspublisher : 2.1.0]]> Wed, 15 Jul 2015 01:59:58 +0000
<![CDATA[PubKit: 0.7.1 (20 Oct 10): front-end document and record creation and management]]> PubKit, a snippet for creating and publishing MODx Evolution documents using front-end web page forms. Full details and download are available at, or you can download from here with less documentation.

PubKit is now published in the Extras. Please raise further questions in its support thread.

PubKit goes beyond the capabilities of its predecessor pkBlog. Key features include:
- PHP classes define types of item, so a variety of formats can be defined without fiddling with the core code;
- classes permit you to create specialized methods and properties for specific types of item, e.g. data validation;
- possibility of using custom tables as well as MODx resources as the basis of your item (you still need to create the tables with phpMyAdmin or a MODx module);
- update any built-in or custom template variable using the snippet (in the sample files, set or clear the published field or an archive flag from the management list);
- hooks to use different language files for prompts and error messages

I know there’s still plenty that could be improved - including better safeguards against item duplication (if you use Back from the preview), and simple arrangements to cater for multiple-author blogs. And there are plenty of comments in the code starting "TO DO...". All the same, I hope you’ll find it worth a try, and let me know how you get on.
cool KP]]> Thu, 19 Jun 2014 07:42:19 +0000
<![CDATA[Multiple NewsPublisher Edit buttons on a single page]]>
Is it possible to add multiple NpEditThisButton buttons to a single page and have it work? I have searched both Google and this forum for a solution and haven't found any posts directly related to this issue (the closest I found was this: I can think of multiple ways to hack around this but I would prefer to do it right if possible. Can anyone shed some light on accomplishing this?

Thanks in advance for any replies!]]> Wed, 04 Jun 2014 02:46:40 +0000
<![CDATA[NewsPublisher not showing RTE]]>
[[!NewsPublisher? &show=`content` &initrte=`1` &rtcontent=`1`]]

The site uses Redactor for the RTE, although TinyMCE 4.3.3 is still installed. Could this be the issue, and if so, is there a way to change the RTE settings just for NewPublisher to TinyMCE?

]]> Tue, 13 May 2014 05:40:27 +0000
<![CDATA[Newspublisher not submitting / creating / updating Revo 2.2.13]]>
1. On a test page, click on NP edit button.
2. Edit page fields.
3. Click submit, page refreshes and nothing has happened.
4. Resource hasn't been updated.

I also tested this with creating pages with NP and same result. I've ensured ACL/permissions are correct. Any ideas?


K.]]> Tue, 08 Apr 2014 04:18:41 +0000
<![CDATA[classkey=Articles or Article?]]> On the guide pages ( it states
&classkey — `Articles`
but the frontend page crashes to a white page. when checking then articles class files i noticed there is no class Articles but there is a class Article. (without the s).
Maybe the guides page is wrong?

Rdg]]> Sun, 15 Dec 2013 10:34:33 +0000
<![CDATA[Newspublisher and non-standard contexts]]> I am currently trying to set up newspublisher in a non-standard contexts (see tutorial: To make Tinymce work, this page was a big help:
But now I’m stuck with creating new resources. For some strange reason, they remain "hidden". They appear when searching for them, and they have the right parent, but they do not appear anywhere in the resource tree or in a getResources output. I have to set the parent manually in the backend, before they appear. Editing existing resources works, although the landing page is somehow strange (no css)

I’m using the latest version (1.1.0-pl1) with Revo 2.1.1-pl Standard. The newspublisher call is:

Besides, I have two other questions:
- The &template parameter seems not to be respected (neither id nor the template name, no error messages), only `parent` works. Am I doing something wrong?
- Is there any way besides coding to specify "default" values for other fields, e.g. "class_key". I would like to have a way for creating a Weblink easily (although there are problems with this, re-editing might not be possible)...

Sorry for this long post. I hope, someone can help me with at least some of these questions!

Cheers]]> Tue, 05 Nov 2013 03:13:43 +0000
<![CDATA[Newspublisher seperate Image upload field]]>
Does anyone know if it's possible to add a separate Image upload field to NewsPublisher, instead of using the RTE to upload a new image.

I'm trying to get it so a few of us can add blogs from our phones, but the TinyMCE doesn't work so well on phones.

I basically need 3 fields - Title, Image, Content - I have Title and Content working fine, I could also upload images from TinyMCE but it's difficult on the phone. I need to add a third field which would be a simple file input, I can then select an image from my phone and upload it and add it to the content.

Is there a way of doing this in NewsPublisher or do I need to go further?


]]> Wed, 30 Oct 2013 10:48:38 +0000