7

PHP Fatal error After Applying SUPEE-6788:

Call to a member function setData() on a non-object in app/code/core/Mage/Adminhtml/controllers/Permissions/BlockController.php on line 113

First I am not able to apply the patch SUPEE-6788. It said

-e ERROR: Patch can't be applied/reverted successfully

Followed the Steps provided in link "Why does PATCH_SUPEE-6788 appear to have no effect on a 1.7.0.2 installation?" and then i was able to apply the patch.

But some Magento blocks are missing at the Home page. After a long search in Google I found that we have to create blocks under System > Permissions > Blocks

But I am not able to access it, because some tables not getting created ( permission_block and permission_variable )

This problem was solved by following procedure ( Tables permission_block and permission_variable did not get created after SUPEE-6788 )

But now I am not Able to edit or create block under permissions, Only List view visible. Getting the above mentioned error

  • did you solve this ?? I am having the same issue – user33716 Dec 1 '15 at 16:19
  • No not yet. Did you find any solution? – Joseph Asir Raja Dec 18 '15 at 12:19
7

app/design/adminhtml/default/default/layout/admin.xml

This error is generated when layout cache hasn't been updated or admin.xml is missing the following code.

<!-- admin permissions block edit page -->
<adminhtml_permissions_block_edit>
    <reference name="content">
        <block type="adminhtml/permissions_block_edit" name="adminhtml.permissions.block.edit"/>
    </reference>
</adminhtml_permissions_block_edit>
<!-- admin permissions variable edit page -->
  • Also check using adminhtml_permissions_role_editrole in nay other xml file.If it is present there then need to be updated also. – Mukesh Dec 26 '18 at 13:17
1

One can manually add/edit/remove the entries in the database. The table permission_block contains the columns block_id, block_name, is_allowed where one can simply add a block to the whitelist by entering the name and setting is_allowed to 1.

Not exactly an answer/solution, rather a workaround....

1

Below solution worked for me: Replcae below code:

$this->getLayout()->getBlock('adminhtml.permissions.block.edit')
            ->setData('action', $this->getUrl('*/permissions_block/save'));

with

$this->getLayout()->createBlock('adminhtml/permissions_block_edit')
            ->setData('action', $this->getUrl('*/permissions_block/save'));

Do similar for VariableController.php same line 113.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.