For the view "commons_bw_documents" under advanced settings > other, "Use Ajax" is currently set to "No". It should be "Yes" (which it is for every other content type that appears in the commons browsing widget)

Because "Use Ajax" is "No", when the user applies filters to a view of documents, he will lose sight of his documents view and reload the generic browsing widget view of all content. He then has to click once more on the "Documents" tab before he can finally see the results of applying the filter.

If it is set to "Yes" then applying the filter works as expected

I am looking at a fresh install built with 7.x-3.3-rc2+9-dev

Comments

japerry’s picture

I've noticed this and a few other views where AJAX is turned off when it probably should be on. Not sure if a meta issue is needed, but maybe we should keep all of the AJAX view problems in this issue?

devin carlson’s picture

Title: Ajax needs to be enabled for view commons_bw_documents » Cleanup commons browsing widget views
Version: 7.x-3.3-rc2 » 7.x-3.x-dev
Assigned: Unassigned » devin carlson
Category: bug » task
Status: Active » Needs review
StatusFileSize
new21.46 KB

It looks like AJAX is only missing for documents but I've noticed a number of inconsistencies between the browsing widget views, so I think a cleanup to standardize all of the view options/properties would be nice.

The attached patch makes the following changes:

  • Standardized the view human name, description and tags.
  • Enables AJAX for the document view
  • Makes the use of the lite pager consistent
  • Adds the sticky sort to documents for consistency
  • Adds the missing group type filter to documents
  • Removes the radioactivity sort from the all view as it is added automatically
  • Added translation support for the all view
  • Removes the flag content relationship, radioactivity sort and flagged filter from the post view as they are added automatically

It also exposed the root of the current problem with using non-AJAX pagers in combination with the browsing widget #2039637: Pager on the main content stream does not inherit sort order. The BW pager IDs are all very high IDs and aren't unique. I think the best course of action would be to automatically alter all of the BW views to have a small unique ID. This would also help anyone who wants to add a new browsing widget view from accidentally overriding the ID of an existing pager.

ezra-g’s picture

Issue tags: +Commons 7.x-3.4 radar

I look forward to reviewing. Thanks! Adding to the 3.4 radar.

ezra-g’s picture

This looks solid to me. I like the approach of setting a dynamic pager ID for views that appear in the browsing widget.

Once question related to that functionality is whether we should consider implementing hook_module_implements_alter() to ensure that our implementation of hook_view_default_views_alter() runs after other modules have defined their views. My sense is that we can commit what we've got here and in the event that a site needs to alter hook implementation order, we can consider a patch (or a site-specific alteration of implementation order) at that time.

devin carlson’s picture

StatusFileSize
new25.08 KB

An updated version of #2 which changes the view tags to sentence case and adds update functions to revert the views.

I agree with #4; there might be a situation in which this implementation of hook_view_default_views_alter() doesn't run last but that could be addressed if someone runs into the issue or on a site-specific basis.

devin carlson’s picture

Status: Needs review » Fixed

Tested #6 on a fresh and existing Commons install. I didn't come across any issues or errors and all of the update functions were detected and reverted the BW views as designed.

Committed #6 to Commons 7.x-3.x.

http://drupalcode.org/project/commons.git/commit/27f26d0

japerry’s picture

Status: Fixed » Needs work
StatusFileSize
new58.5 KB

It seems that on an existing commons install, the pagers will show up as overridden.

Commons groups shows the following (so does q_a):

ezra-g’s picture

Assigned: devin carlson » ezra-g

I'm looking into the overridden features.

ezra-g’s picture

Following https://drupal.org/node/2086905#comment-7891595, all features appear to be in their default states if we comment out the dynamic pager implemented in this issue.

If it's not practical to prevent this views alteration from causing features to appear overridden, an alternative would be to reserve a range of specific pager IDs for Commons default content types (eg, content types that ship with Commons could have pager IDs 10-20 or similar).

ezra-g’s picture

Status: Needs work » Needs review
StatusFileSize
new6.37 KB

This patch implements static, non-colliding pager IDs for the BW views as proposed in #10. In my testing, this makes it possible to revert all of the Commons features to their default states.

ezra-g’s picture

Status: Needs review » Fixed

I verified that features are in their default states with #11 and committed: http://drupalcode.org/project/commons.git/commit/48b02eb . Marking as fixed.

japerry’s picture

Status: Fixed » Needs work
StatusFileSize
new116 KB

Both Devin and I have seen the views being overridden on RC1 and HEAD for views with pagers.

Screenshot_10_4_13_10_14_AM.png

These features (content types) are affected:

  • Commons Polls
  • Commons Posts
  • Commons Q&A
  • Commons Wikis
ezra-g’s picture

Status: Needs work » Fixed

My commit missed an all-important hunk of this patch:

http://drupalcode.org/project/commons.git/commitdiff/cc72320?hp=1e6b7c7f...

This should now be resolved.

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

Anonymous’s picture

Issue summary: View changes

adding information about my version