Ticket #1244 (closed defect: fixed)
Saved block options have no effect on PHP 5.2.1[23]
| Reported by: | lildude | Owned by: | |
|---|---|---|---|
| Priority: | blocker | Milestone: | 0.7 |
| Component: | Habari Core Software | Version: | SVN |
| Keywords: | blocks | Cc: |
Description
Saved block options have no effect.
The options are successfully saved to the database, but they're not pulled back in correctly by the block config form or the action_block_content_*() methods provided by the plugins.
Several plugins which use blocks that provide configuration options for the the blocks don't seem to be able to actually use these options. I've tested this with the "popular_posts" and "twitter" plugins.
The problem seems to be $this->data is empty when we get to #L138, called on #L31
Marking this as a blocker as it's a feature we're pushing for 0.7.
Attachments
Change History
comment:2 Changed 20 months ago by lildude
Looks like this may be something specific to the version of PHP.
PHP 5.2.12 fails. PHP 5.2.9 and PHP 5.3.2 work.
comment:4 Changed 18 months ago by lildude
- Summary changed from Saved block options have no effect to Saved block options have no effect on PHP 5.2.1[23]
Note: See
TracTickets for help on using
tickets.


I believe I encountered that exact problem when developing a simple plugin using blocks; https://habariproject.org/forums/comments.php?DiscussionID=165&page=1#Item_0
I believe that it is a PHP bug with the unserialize function - the following bug may be related to it (I thought it was, but now I have reread it and it may not be):
http://bugs.php.net/bug.php?id=48387
I avoided that bug by switching to PHP 5.3.2 - that function is a quite complex piece of work, so I don't know how we can fix it for Habari.