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?

CommentFileSizeAuthor
#6 user_created_argument-1090606.patch2.62 KBbjalford
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

dawehner’s picture

Version: 7.x-3.x-dev » 6.x-3.x-dev
Category: feature » task

Someone 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.

bjalford’s picture

I 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?

dawehner’s picture

Status: Active » Postponed (maintainer needs more info)

Without the error?

Please post the error

bjalford’s picture

Here 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).

dawehner’s picture

Status: Postponed (maintainer needs more info) » Active

The column is "created" not timestamp :)

bjalford’s picture

Version: 6.x-3.x-dev » 7.x-3.x-dev
Status: Active » Needs review
FileSize
2.62 KB
dawehner’s picture

Version: 7.x-3.x-dev » 6.x-3.x-dev

In general it looks fine.

Would like to test the patch.

Applies to 6.x-3.x, too.

dawehner’s picture

Status: Needs review » Fixed

Commited to 6.x-3.x and 7.x-3.x

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.