I'm creating this as a support request because I don't know if this is a bug, a missing feature or just my own fault.
I've downloaded the latest 5.x version. After configuring the first bookmark I added another one using admin/build/views_bookmark/add. However, it does not appear when I try to create a view for it. The only filter (and argument) appearing is 'Bookmark: bookmarks' which makes multiple bookmark tags quite useless.
| Comment | File | Size | Author |
|---|---|---|---|
| #3 | views_bookmark.02.patch | 2.11 KB | NaX |
| #2 | views_bookmark.patch | 1.31 KB | NaX |
Comments
Comment #1
NaX commentedThis does seam to be a bug.
I had a look at the 4.7 version and it does add all the created bookmarks as filters. But both the 5.x and HEAD version does not seem to do this.
I also got this error “Validation error, please try again. If this error persists, please contact the site administrator.” when adding the new views fields “Bookmark: User for bookmarks” and “Bookmark: Count for bookmarks”
That makes me think the views section of the 5.x version needs some attention. I don’t know much about the views module to really know why but since this was there and is not any more maybe the views module has changed and this module needs to be updated.
Comment #2
NaX commentedI think I found the problem. What I found is that when I added new bookmarks and then later installed another module the new bookmarks all of a sudden would appear as filters. Also when using the devel module I used the Empty cache page and the newly added bookmarks would appear.
So after a few min digging I found that the cache table need to get cleared so that records like cid=“views_tables:en” would get refreshed.
I have attached a patch that clears the views cache an submit of new bookmarks.
For those that don’t use patch’s all you need to do is:
Add this at line at line 264
And this at line 281
So that the views_bookmark_form_submit() function now looks like this.
Or you can just clear the cache manually every time you add a bookmark.
Comment #3
NaX commentedHere is an updated patch that also clears the views cache when bookmarks are deleted.
Same thing as before, just for the views_bookmark_delete_confirm_submit() function.
Comment #4
Scott Reynolds commentedsubscribing
Comment #5
merlinofchaos commentedviews_invalidate_cache() is a much safer option, and I went with that. Commited to -dev.
Comment #6
(not verified) commented