Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
I wish to create a view similar to the archive view but instead of being based on node creation dates be based on User: Created date. Is this possible currently?
Comment | File | Size | Author |
---|---|---|---|
#6 | user_created_argument-1090606.patch | 2.62 KB | bjalford |
Comments
Comment #1
dawehnerSomeone would have to write "user: Created year + month" and some more.
This could be done in 6.x-3.x, too.
See #373615: Comment date not available as arguments for a similar issue with comments.
Comment #2
bjalford CreditAttribution: bjalford commentedI tried adding to users.views.inc the same same data as the comments patch (replacing comments with users)
e.g.
$data [users]['timestamp_fulldate'] etc with the same handlers. The options appear under arguments in views UI but they produce an error...
Can you point me in the right direction?
Comment #3
dawehnerWithout the error?
Please post the error
Comment #4
bjalford CreditAttribution: bjalford commentedHere is my user.view.inc (my bit at line 185) http://pastebin.com/ViDBQHB5.
Error:
An AJAX HTTP error occurred.
HTTP Result Code: 500
Debugging information follows.
Path: /?q=admin/structure/views/ajax/preview/users_per_month&render=overlay
StatusText: Service unavailable (with message)
ResponseText: PDOException: SQLSTATE[42S22]: Column not found: 1054 Unknown column 'users.timestamp' in 'field list': SELECT COUNT(*) AS expression
FROM
(SELECT DATE_FORMAT((DATE_ADD('19700101', INTERVAL users.timestamp SECOND) + INTERVAL 0 SECOND), '%Y%m') AS timestamp_year_month, 1 AS expression
FROM
{users} users
GROUP BY timestamp_year_month) subquery; Array
(
)
in views_plugin_pager->execute_count_query() (line 140 of /Applications/XAMPP/xamppfiles/htdocs/lot/sites/all/modules/views/plugins/views_plugin_pager.inc).
Comment #5
dawehnerThe column is "created" not timestamp :)
Comment #6
bjalford CreditAttribution: bjalford commentedComment #7
dawehnerIn general it looks fine.
Would like to test the patch.
Applies to 6.x-3.x, too.
Comment #8
dawehnerCommited to 6.x-3.x and 7.x-3.x