Block ID from the add.php or edit.php page?
$this->bid; -> this returns a null value
$this->controller->bid; -> this returns a null value
$b->getBlockID(); -> this returns an error about a call on an undefined object which is $b because it was never created.
Any help would be appreciated. Thanks.
Here is what it look likes in the edit.php of the block:
The form still returns -1 in the edit.php.
Did you find the reason $bID was returning NULL value.
I have created a custom block. And I am able to add the block perfectly fine. On adding a block a new ID is added in the database as well.
But when I try to get the $this->bID it returns NULL, also I am not able to delete the block as well because of the following error is thrown due to bID having NULL value.
An exception occurred while executing 'select * from btAddressSearch where bID=':
SQLSTATE: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1
Do you have any insights that can help me out.