Hi Stalski,

thank you again for your amazing work on this module...

I recognized a bug with the actual version, I'm not sure since when it exists:

I tried to edit my custom heartbeat messages on .../admin/build/heartbeat
After choosing "edit" after any of the messages a Edit Form appears which is completely empty.

Thank you for having a look at this.
Ben

Comments

Stalski’s picture

sorry ,
i had noticed it as well, and fixed it immediately. see last commit
http://drupal.org/cvs?commit=338110

I would like to release today, so hopefully you will have this fix right away ... or you check out from cvs ;)

thx for the report , stupid one , deprecated function i tried to facility (forgot the %heartbeat_message menu wildcard using heartbeat_message_load to load default stuff to our edit form)

regards,

Stalski

Stalski’s picture

Assigned: Unassigned » Stalski
Status: Active » Fixed
Stalski’s picture

Status: Fixed » Closed (fixed)
Stalski’s picture

FYI: i am fixing all bugs in issue queue for drupal6 and am working on the drupal7 version as well. Just so you know ;)

ManyNancy’s picture

Status: Closed (fixed) » Active

I got the same thing, and after updating from CVS all my custom messages were deleted... :(

8 messages were deleted.

Stalski’s picture

@ManyNancy
hmm, yes that's normal with the thing i 've done. I suppose you did not export them to code? That's what i would recommend in the future. This module is still under development and such changes in storage can happen in dev releases.

In this case i cannot provide backwards compatibility for the customly added messages, but i am thinking about a sollution for other people.
This was as fix to this issue. So what you just experiences is a new issue.

Can you import your messages again from database backup? If you can, change the custom field into value "2" that stands for the new constant for it "HEARTBEAT_MESSAGE_CUSTOM". After this, try to export them to code immediately.

ManyNancy’s picture

I will do as you say and export from backup, though I am disappointed to hear that message loss is something that should be expected when doing updates.

But thanks for making such a great module!

The grouped messages are truly great, for all of the 5 minutes I got it working before the templates got deleted. :)

Stalski’s picture

@ManyNancey, no that's not what i said. quote:

This module is still under development and such changes in storage can happen in dev releases

I only mean that it's in dev and people like you have it enabled and errors in dev releases can contribute to the stable release. I am looking on how to make sure it wont happen for others. I just find it weird that i haven't got the same problem you have. The only thing that should happen is the custom variable that is changed within a template. Make sure that they follow this new convention and it should work again.

changes i made:

// Default messages with codebase
define('HEARTBEAT_MESSAGE_DEFAULT', 1);

// Custom built messages with UI
define('HEARTBEAT_MESSAGE_CUSTOM', 2);

// Default messages that are changed by UI
define('HEARTBEAT_MESSAGE_CHANGED', 4);

and before it was :

// Default messages with codebase
define('HEARTBEAT_MESSAGE_DEFAULT', 0);

// Custom built messages with UI
define('HEARTBEAT_MESSAGE_CUSTOM', 1);

// Default messages that are changed by UI
define('HEARTBEAT_MESSAGE_CHANGED', 2);

and with bitshifting i did not get my result to handle deletions deferrently for custom vs message template defaults

I hope this is a little clearer on how to fix the problem.
Sorry, i regret this happened for you.

Stalski’s picture

Status: Active » Fixed

@ManyNancy : i think i fixed it, so you wont lose them again after importing. So the import/migrate is adjusted and i've written an update hook so people can fix their database table.

Is it possible for you to review this? I am committing this at the moment.
So in general: when updating it should be fixed for the migration (i can expect that from people after taking a new versoin, that's the drupal way)
and i altered the statements for being a default vs a custom message template.
Custom messages can be edited but not reverted, while code defaults can.

Stalski’s picture

Status: Fixed » Closed (fixed)

tested and committed