404 pages with NewsPublisher issue?

Is there any reason why web users frequently get a 404 page with a need to clear the cache before they can view and edit content on a NewsPublisher page?
Nothing in the error log.
Running MODx 2.8.6
NewsPublisher 3.1.4

I don’t know of any.

Is the NewsPublisher page itself cacheable or not (check on the “Settings” tab when editing the page).?

Thanks @bobray.
I have turned caching on and off to see if makes any difference. This could well be user-error which is making it difficult to troubleshoot.
I’ll update this post if any more problems occur.

Update…I have just logged in on my phone and got a 404 page not found…yet on my laptop I have logged in successfully.
Once the cache is cleared the NP page displays.
Error log as follows but none seem pertinent to this issue:

[2024-03-22 19:29:26] (ERROR @ /home/website/public_html/core/cache/includes/elements/modplugin/1.include.cache.php : 37) PHP warning: Use of undefined constant OnDocFormRender - assumed 'OnDocFormRender' (this will throw an Error in a future version of PHP)
[2024-03-22 19:59:16] (ERROR in resource 1 @ /home/website/public_html/core/model/modx/modparser.class.php : 1373) Bad link tag `[[~]]` encountered
[2024-03-22 20:08:00] (ERROR in resource 1 @ /home/website/public_html/core/model/modx/modparser.class.php : 1373) Bad link tag `[[~]]` encountered
[2024-03-23 19:45:45] (ERROR in resource 1 @ /home/website/public_html/core/model/modx/modparser.class.php : 1373) Bad link tag `[[~]]` encountered
[2024-03-24 14:26:56] (ERROR @ /home/website/public_html/core/model/modx/xmlrss/rssfetch.class.php : 241) User warning: MagpieRSS: Failed to fetch https://forums.modx.com/board.xml?board=294 (HTTP Response: HTTP/1.1 301 Moved Permanently
)
[2024-03-24 14:27:18] (ERROR @ /home/website/public_html/core/cache/includes/elements/modplugin/1.include.cache.php : 37) PHP warning: Use of undefined constant OnDocFormRender - assumed 'OnDocFormRender' (this will throw an Error in a future version of PHP)

Caching is off on the page.
NP call in a Template:

[[!NpEditThisButton? &debug=`1` &right=`20%` &bottom=`68%`]]

I do have this same call in another Template - could that be an issue?
Any idea what could be going on?
Thanks for any help

Does this help?

If the NpEditThisButton doesn’t work, be sure the NpEditThisButton property np_id is set to the ID of the page with the NewsPublisher snippet tag.

When it works, what does the NpEditThisButton caption look like?

Using the button in multiple templates shouldn’t be a problem, but make sure the tag is uncached in all of them:

``[[!NpEditThisButton … ]]```

Thanks @bobray.
It’s not the button that doesn’t display it’s the entire page - the 404, page not found.

"When it works, what does the NpEditThisButton caption look like?"

As it should - as an ‘Edit’ button.

The call is unchached.
When I set the np_id to the resource ID the ‘edit’ button disappears so i’ve removed the np_id

The 404 page happens intermittently and has done since using NP but once the cache is cleared (either via the Manager or manually) the page displays as expected.

It sounds like a permission issue on the NewPublisher page, though I can’t see why clearing the cache would affect that.

The user needs to have edit_document, save_document, and save permission for the page the shows the edit button.

If it’s the home (site_start) page being edited, they also need the editHome property set in the button’s snippet tag.

For security, NP saves a session variable with the ID of the page to be edited: $_SESSION['np_doc_to_edit'], so it could also be a session issue

Another thought: Look at the page source of that page with the button when it’s likely to fail. Check the action at the top of the form. It should be the URL of the NewsPublisher page. If it’s ever blank, that’s the problem. That would normally be accompanied by a “Bad link tag” message in the error log. If your version of MODX is up to date, you should also see a reference to the resource with the bad tag in the error message.