Issue initiating NewsPublisher Filebrowser

I have created a file tv (dailyTrades) and included it in a NewsPublisher snippet call, but it does not function from the front end when viewing the NewsPublisher page

Here is the snippet call:

[[!NewsPublisher?
    &outertpl=`npOuterTpl_custom`
    &initrte=`1`
    &initfilebrowser=`1`
    &rtcontent=`1`
    &show=`pagetitle,marketSummary,content,dailyLearning,dailyTrades`
    &published=`1`
    &hidemenu=`1`
    &parentid=`6`
    &template=`3`
    &published_default=`1`
    &hidemenu_default=`1`
    &cacheable_default=`1`
    &searchable_default=`1`
    &presets=`pagetitle:[[!+nowdate:default=`now`:strtotime:date=`%Y-%b-%d`]]`
    &captions=`pagetitle:Session Date,marketSummary:Market summary,content:Session summary,dailyLearning:Key observations and learnings`
]]

In addition, I:

  • removed the upload command from the npElFinderConnector snippet disableCommands properties
  • enabled the file_manager setting in the NewsPubliser ACL permissions

Two additional observations that may or may not be relevant:

  • When I try to view the npElFinderConnector resource from the front end, I get:
{"error":["errUnknownCmd"]}

Have I missed something in the setup that is causing this issue?

EDIT: Now Newspublisher – same call as above – will not submit form entries and create a new resource. Submit just reloads the NP page – no error recorded in the Error Log, nothing. No way to debug.

Determined why NewsPublisher stopped processing requests - I had not included the content field in the snippet call.

This extra is well-documented, but has only a single mention of this requirement in the docs, within the &required row of the parameters table.

If the content field is included but nothing entered, NP provides a requirement error. If not included, NP provides no error - it just reloads the form.

That’s a poor UX (for lack of a better descriptor). I determined the issue only after stripping the snippet call to bare bones, while happening to include the content field in the &show parameter.

There are no required fields in my particular case, and I have no need for the content field. FWIW, I got around the requirement by providing a preset value for the content field, and hiding it via css. Same with pagetitle.

Just out of curiosity. What is the purpose of a resource without a content or a pagetitle?

I didn’t say the resource doesn’t use the pagetitle – it is autogenerated, and not something the user manages.

My use case doesn’t require the content field. What more do you need to know? :slight_smile:

1 Like

I don’t know if this solved already:

Concerning elfinder: I had the same error. There are two ressources for newspublisher called npElFinder and npElFinderConnector. They have to be in published and on first level of the ressource-tree. They are called with a static name. If you move them you need to make sure that you set a static uri so that they can be found unter the same name.

My issue was pilot error. I didn’t have FURLs turned on in system settings.

I have both el Finder resources nested with no change to resource type (i.e. neither are set as static), and haven’t experienced issues with this.