Ticket #1244 (closed defect: fixed)

Opened 20 months ago

Last modified 17 months ago

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

1244.diff Download (690 bytes) - added by mikelietz 17 months ago.
based on BigJibby's suggestion - needs more testing.

Change History

comment:1 Changed 20 months ago by jhominal

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.

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:3 Changed 20 months ago by mikelietz

It also fails in 5.2.13.

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]

Changed 17 months ago by mikelietz

based on BigJibby's suggestion - needs more testing.

comment:5 Changed 17 months ago by lildude

I can confirm the patch fixes the problem for me.

comment:6 Changed 17 months ago by mikelietz

  • Status changed from new to closed
  • Resolution set to fixed

Fixed in r4345.

Note: See TracTickets for help on using tickets.