The URL for setting a bean revision to be active is displayed as: http://example.com/block/test-1/revisions/123/set-active?destination=blo... This would translate to 'block/%bean_delta/revisions/%/set-active'. However, the menu item for that task is actually 'block/%bean_delta/revisions/%/set-default'.

Comments

albert volkman’s picture

Status: Active » Needs review
StatusFileSize
new479 bytes

Easy enough fix.

albert volkman’s picture

Hrm, this leads to another issue-

Fatal error: Call to undefined method Bean::setDefault() in bean.pages.inc on line 535

And, I can't seem to find a setDefault method anywhere...

damienmckenna’s picture

Version: 7.x-1.1 » 7.x-1.x-dev
StatusFileSize
new1.71 KB

Drupal core uses 'node/%node/revisions/%/revert' for node revisions, so lets use that URL.

damienmckenna’s picture

StatusFileSize
new951 bytes

That link was for something else, this will work.

damienmckenna’s picture

StatusFileSize
new970 bytes

Needed to run menu_rebuild() too.

damienmckenna’s picture

Status: Needs review » Fixed

Committed.

damienmckenna’s picture

Sorry Albert, I never noticed your replies, had a serious case of tunnel-vision.

It may have needed the hook_update_N() to rebuild the menu cache before it would work correctly, see the patch in #5.

Status: Fixed » Closed (fixed)

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

ar-jan’s picture

Status: Closed (fixed) » Needs work

On a fresh install of Drupal 7.23 with Bean 1.5 this still happens. When I create a block type, create a block, edit it and create a new revision, go to the revision list and click 'Set active' on the first revision.

The link is to /block/mytestblock/revisions/1/set-active?destination=block/mytestblock/revisions.

Fatal error: Call to undefined method Bean::setDefault() in /sites/all/modules/contrib/bean/includes/bean.pages.inc on line 540.

ar-jan’s picture

Title: "set active" menu link points to the wrong URL » "set active" gives fatal error "Call to undefined method Bean::setDefault()"

title.

samvel’s picture

subscribe, method missing

indytechcook’s picture

Issue summary: View changes
Status: Needs work » Fixed

Not sure what happen here but it was removed

Here is the fix: https://drupal.org/commitlog/commit/22232/8bd0b75ab9ca6b6a4bacb8448cecfe...

Status: Fixed » Closed (fixed)

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