0

I am using Drupal 8.

I have been trying to find how many nodes (count) have been created by each user of my drupal site.

Following some excellent (although quite old) threads here and here among other sources, I managed to create a View that answers that question. I added a criterium to filter the date. I expose the filter so I can play around with it. The results are a table like:

User     Nodes Created
 A           20
 B           10
 C           5

However, I also want something a bit more subtle, for which I could not find any help.

I 'd like to know how many node updates a user has done. Something like a table:

    User     Updates
     A        100
     B        90
     C        80

etc..

I have no idea if this is possible and I could not find any relevant information. I haven't really been using revisions in my site, if that's relevant..

Hope it makes sense,

thanks in advance for any help.

5
  • on a D7 site this is what i did, in content type add an entity reference field to user, called node_updated_by, and with rules, reacting on event 'updating content', set that field value with current user, then in views make a view, add relationship to to this new field, add contextual filer on this user field, done.
    – pinueve
    Commented Apr 7, 2020 at 20:13
  • 3
    I may be wrong on this, but I am fairly sure if you have not been using revisions, drupal will not be counting node updates, as it will simply overwrite the same rows in the database tables. So there is no way to get this data for the past. For the future, you could write some hooks to log this to a custom table, but then again, you could also just start using revisions. Commented Apr 7, 2020 at 20:13
  • thanks both for your time in replying. Unfortunately Rules is still in alpha for D8. For the second reply, I see the logic in this, perhaps its not possible without revisions (I guess that's (also) what revisions are all about after all). I will wait to see if someone comes up with another way. Fortunately it's not something critical, I might just have to live without it :) .. Thanks again.
    – thomas
    Commented Apr 7, 2020 at 21:37
  • 1
    As alrdy mentioned, without revisions its impossible to get the edit data in the past. But if you want to keep track moving forward & still not use revisions, you could add a numeric field to user fields and simply +1 it when a node is updated.
    – No Sssweat
    Commented Apr 8, 2020 at 15:32
  • OK, I get it. Thanks everybody!
    – thomas
    Commented Apr 9, 2020 at 8:56

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.