fiddling around with the data manager plugin after some investigations w.r. to comments plugins - see this thread I just wonder how it would be possible to access comments via the Datamanager Admin UI,
especially, how to delete unwanted comments this way.
reading the datamanger plugin docs I thought the Admin UI would display everything under user/data without any special configuration.
and, well, it does that, but not everything:
as seen in the screenshot, everything present in the user/data folder is there, except the comments.
the comments folder, as a difference to the others, has its data (the yaml files) in the subfolder user/data/comments/de/blog.
so I supposed the datamanager will only display folders which contain data files in the folder itself (not subfolders), and copied some comment files directly in user/data/comments.
still no dice - datamanager does not show comments.
next try was to add:
to data-manager.yaml - same result.
so my question here: does anyone know how to convince datamanager to show/handle comments ?
oh, well, I just noticed that, a while after having copied some comment data files directly into the user/data/comments folder, they suddenly show up in the datamanger admin UI .
so I guess this is a caching issue.
however, the other observation (data manager not showing files in subfolders) still holds.
as a conclusion, datamanager cannot be used to show (or delete, the real intention) comments (at least, not those generated by the comments plugin).
@hoernerfranz, When collecting /user/data folders, Data Manager fires an event called onDataTypeExcludeFromDataManagerPluginHook, which allows plugins to return a name of a /user/data folder to be excluded.
Both plugins Comment and Guestbook respond to that event and “tell” Data Manager to exclude folders named “comments” resp. “guestbook”.
That’s probably because these two plugins use a data format in their /user/data files that doesn’t fit with Data Manager.
yes, I saw that exclude Option in the docs, but it is not the data format itself which is not compatible with Data Manager, just the folder structure under user/data.
so, for my own use, I created a Data Manager Fork which has the Option to adjust the base directory, from which Data Manager starts to work, and when I use /comments/de for this Option, I can view, read and even delete comments from comments plugin, as the comments data files are yaml format, which Data Manager can handle without problems.
I see three issues which prevent DataManager to show data from Comments and Guestbook plugin:
Both Comments and Guestbook plugin tells data Manager to exclude folder “comments”, resp. “guestbook”.
That’s the primary reason why DataManager is not showing any comments/guestbook entries.
If that issue were resolved, then DataManager stumbles upon multi-lingual sites because Comments plugin now creates a /user/data/comments/<lang>/comments.yaml file, as you have discovered. DataManager doesn’t handle that.
And if the multi-lingual issue has been address, DataManager will not be able to handle the /user/data/comments/<lang>/comments.yaml file because DataManager sees every file as a single comment entry, while the Comments plugin, uses a single file to hold multiple comments.
My guess is that your solution won’t work:
Telling DataManger to start searching inside /user/data/comments/de will not solve the issue.
Below the new path, DataManager expects a top folder in which it expects to find *.yaml data files.
It now expects /user/data/<route>/comments/comments.yaml, which of course is being ignored.
Data Manager expects a data file per item, not a file containing multiple items.
I’ve installed your “joss” branch and I cannot get it to work…
I’m curious to know how you have managed to get it to work.
you are of course right with the assumption, that my solution will not work well with muli-lingual sites.
it is also not intended to be a solution for the public, just for my own usage .
and, yes, I can assure it work for me, see these screenshots:
from there I can click on the ‘31 Elemente’ Link and get this:
that is right, but no problem - the page Blog itself is not intended to be commented, hence comments are disabled there.
this is also true, but, normally, also not a big problem.
usually, I keep comments enabled on new blog posts for awhile (e.g. 2 weeks) - during that time, I can see if there are valid comments (which mostly arrive relative soon after publish date).
but sometimes, despite having recaptcha enabled, SPAM comments arrive even during that period, and as long as there are no valid comments yet, I can easily delete them with the current solution.
otherwise, I have log into my hosting site via ssh, edit the comment file and disable comments .
in fact, SPAM comments have not been a real problem for years, but recently, I noticed that google recaptcha gets bypassed more often.
maybe I should try another solution…