Closed (fixed)
Project:
Bean (for Drupal 7)
Version:
7.x-1.x-dev
Component:
Code
Priority:
Critical
Category:
Bug report
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
2 Aug 2012 at 13:11 UTC
Updated:
4 Jan 2014 at 02:24 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
jonhattanComment #2
indytechcook commentedSo there is a bug with the delete button showing. It should show on the edit form. Here is a patch. Please test.
Comment #3
finex commentedThe last patch doesn't work on the current -dev release: the delete button is not shown.
Even after creating the bean block type,
$form['new']is an array with the#valuealways "TRUE".Moreover, if you skip the if included in the patch, the delete button is visible but it throws two errors:
And the redirected page (admin/structure/block-types/manage//delete) is not found.
Comment #4
indytechcook commentedThanks for the quick test. I'll work on it some more.
Comment #5
betz commentedIt looks reverse now. The delete button shows on the 'add form', but not on the 'edit form'.
Comment #6
jonhattanIf the bean is exported to code, $form['new'] is always true, because of:
Comment #7
jonhattanA fix is attached:
* don't show the button on creating a bean_type
* don't show the button if the bean is exported to code and not overridden
* show otherwise: if it's not exported to code or if it's in code and overridden (in this case the button label changes to 'revert')
Comment #8
jonhattanAdjust issue tag
Comment #9
indytechcook commentedThanks jonhattan. I echoed one comment from #1785950: Revert and delete should be separate operations. THanks for the issue tag also.
We can't assume getExportStatus() exists.
May I ask why this change was necessary?
Comment #10
indytechcook commentedThanks http://drupal.org/commitlog/commit/22232/2f4075ef5d6b3ccc6a30259fcc7aad5...
Comment #11
jonhattanSorry for the delay in my response, I've been relocatring to another city.
On your second question in #9. I think I did this just because the object is primarily assigned to $form['bean_type'] but can't remember details now. Once I test the new code will open new issues if neccesary.
Note that you introduced a patch file in the root directory with this commit: bean-1786036.patch
Comment #12
jonhattanCreated a new issue for that #1814068: Remove leftover patch files in repo