Setup
Views_bookmark dev version 5.1.4
New bookmark named 'approval'.

If a bookmark is set to 'global', it behaves inconsistently.

On a full node view, it seems fine.
One user marks the node as 'approved' using the bookmark link.

A second user can see the change refelected on a full node view.

However, it doesnt seem to work quote so well for a table view of the nodes.
I setup the view, with a few fields, and the 'approve this' link at the side.
If user A clicks the 'approve this' link, the full node refelects the change for user B... sometimes [an inconsistent bug... the best kind :-( ]
but the table view does not refect the change on user B's browser.
Even after waiting a few seconds, and refreshing the browser window for user B, the view remains the same.
Sometimes, if user A uses the bookmark link, waits a few seconds, and hits refresh on their own browser, the view goes back to the state it was in before clicking the bookmark link

Also, filtering using that bookmark also appears to fail.
I'm trying to display a list of nodes with the 'approved' bookmark applied.
Regadless of whether is set to 'is marked by' any user, or currently logged in user, it doesn't filter the result set.

Hopefully some of that made sense.
This is an awesome module, with HEAPS of potential [goodbye sticky, unpublished, promoted checkboxes].
I sense that it could be merged with nodequeue. Nodequeue seems like an application of views_bookmark to me.

Regards
Alan

CommentFileSizeAuthor
#4 vb_global.diff1.14 KBmooffie

Comments

mooffie’s picture

Setup
Views_bookmark dev version 5.1.4

I'm not sure what version you're using.

The official v5.1.4 indeed has the first bug you described.

It was fixed in the 'development' version. Please try it out:

http://ftp.drupal.org/files/projects/views_bookmark-5.x-1.x-dev.tar.gz

(don't forget to run 'upgrade.php'.)

Also, filtering using that bookmark also appears to fail.

If the 'developmenet' version doesn't solve this, please export your view definition and paste it here.

You have both 'approved' and 'bookmarks' marks. Perhaps you mixed the two. It's easy to confuse them.

I sense that it could be merged with nodequeue.

These two modules have a lot in common.

alanburke’s picture

Category: bug » support

Great Work Moofie,

True enough, I was reporting 3 seperate issues.
I was using the version you linked to, 5.1-dev

1. Global bookmarks work, on a node by node basis.
User A approves a node, user B refreshed browser window, and sees the change.

2. Views Filtering does work for a Global bookmark,
It took me a while to get this right.
Again, 'approving' or 'unapproving' a node, in full node view, will affect the results set, where filtered by 'approval' mark.

However, I think I might have stumbled upon something amiss with Opera.
I'm not sure that the Global bookmarks links work in Opera.
Non-global links seem fine[such as the default 'bookmark' link] , but if a bookmark is set to Global, It just doesn't seem to work in Opera.
You can click it, but I'm not sure to gets recorded. Refreshing the node after 10 seconds or so, will show the boomark link had no affect.
I'll leave that aside for now, and try to confirm it.

3. For a table view, the 'ops' links seem random.
They sometimes don't seem to reflect the current status of the 'approved' mark.
When a node has been marked 'approved' the link may still say 'approve this'.

I can't spot why...

So I'm changing this to a closed support request.
I may open seperate Bug reports , [Opera issue etc] if I can reproduce them consistently

Thanks Moofie!

Pasted exported view

  $view = new stdClass();
  $view->name = 'applications';
  $view->description = 'Job Applications [args nid]';
  $view->access = array (
  0 => '5',
  1 => '4',
);
  $view->view_args_php = '';
  $view->page = TRUE;
  $view->page_title = '';
  $view->page_header = '';
  $view->page_header_format = '1';
  $view->page_footer = '';
  $view->page_footer_format = '1';
  $view->page_empty = '';
  $view->page_empty_format = '1';
  $view->page_type = 'table';
  $view->url = 'applications';
  $view->use_pager = TRUE;
  $view->nodes_per_page = '10';
  $view->sort = array (
    array (
      'tablename' => 'node',
      'field' => 'created',
      'sortorder' => 'DESC',
      'options' => 'normal',
    ),
  );
  $view->argument = array (
    array (
      'type' => 'content: field_ref_job',
      'argdefault' => '2',
      'title' => '',
      'options' => '',
      'wildcard' => '',
      'wildcard_substitution' => '',
    ),
  );
  $view->field = array (
    array (
      'tablename' => 'node',
      'field' => 'nid',
      'label' => '',
    ),
    array (
      'tablename' => 'users',
      'field' => 'name',
      'label' => 'Applicant',
    ),
    array (
      'tablename' => 'node_data_field_ref_job',
      'field' => 'field_ref_job_nid',
      'label' => 'Job',
      'handler' => 'content_views_field_handler_group',
      'options' => 'default',
    ),
    array (
      'tablename' => 'views_bookmark_ops_4',
      'field' => 'ops',
      'label' => '',
    ),
    array (
      'tablename' => 'node',
      'field' => 'view',
      'label' => '',
    ),
  );
  $view->filter = array (
    array (
      'tablename' => 'node',
      'field' => 'type',
      'operator' => 'OR',
      'options' => '',
      'value' => array (
  0 => 'job_app',
),
    ),
  );
  $view->exposed_filter = array (
  );
  $view->requires = array(node, users, node_data_field_ref_job, views_bookmark_ops_4);
  $views[$view->name] = $view;
alanburke’s picture

Status: Active » Fixed
mooffie’s picture

Status: Fixed » Active
StatusFileSize
new1.14 KB

Are you sure this is 'fixed'? I revert it back to 'active'.

I had a look at the source and it seems the 'Ops' indeed won't work correctly for global bookmarks. That's because, for a global bookmark, it's not really the current user who bookmarks it but a user with UID zero.

My computer is not suitable for running Drupal at this hour, so I can't check matters. I'm attachig the patch I'm going to try.

might have stumbled upon something amiss with Opera.

(I'm using Opera.)

[...] I'm not sure that the Global bookmarks links work in Opera.

To find out if the problem is in the module itself or in the JS code it uses, don't trigger the JS code. You do this by 'right clicking' on these links (and then 'open in new window') instead of 'left clicking' them (or, do 'middle click', if you have this setup.)

alanburke’s picture

Hi There
I just marked it closed as I couldn't reproduce the bugs consistently.
The plan was/ is to to open better bug reports for the individual problems, once I worked out exactly what was going wrong..

Funnily enough, Opera is behaving itself now.

I applied the patch [applies cleanly] to the dev version.
Should this be fixing table views, with bookmark op?
If it is trying to fix that, its still not working.
The wrong labels are still appearing.

Regards
Alan

mooffie’s picture

Category: support » bug

I applied the patch [applies cleanly] to the dev version.
Should this be fixing table views, with bookmark op?

Yes, this patch makes the 'Ops' field work for global bookmarks. (by "work" I mean: show the correct state.)

(I've now tested this patch and it indeed fixes a problem, so I commited it.)

If it is trying to fix that, its still not working.

You probably didn't clear the cache. Views saves all definitions in a cache and if you just applied the patch, but didn't clear the cache, it's as if you've done nothing.

Go to q=admin/build/views/tools and hit the 'Clear views cache' button. Please check it out and report back. If it solved your problem, please mark this issue as 'fixed'.

The plan was/ is to to open better bug reports for the individual problems

Yes, please do that. Let's leave this issue to deal only with the 'Ops' field, for global bookmarks.

alanburke’s picture

Status: Active » Reviewed & tested by the community

Silly me, should have cleared the cache.
All looks good now.
RTBC

Regards
Alan

mooffie’s picture

Status: Reviewed & tested by the community » Fixed

Alan, thanks.

(Could you please help in the Better titles for fields/filters/sorts in Views issue?)

Anonymous’s picture

Status: Fixed » Closed (fixed)

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