Hi,

I've just started using radiant and its a wonderful CMS but I'm facing the
following problem. Essentially I'm trying to make a little modification to
pilu's radiant-gallery extension( http://github.com/pilu/*radiant*-*gallery*
** ). This is what I did: The Gallery model has a description attribute I
wanted two other pseudo-fields A and B in the description field separated by
a comma. So I create two attr_accessors A and B and two callbacks:
before_save(to merge the two fields to a comma-separated list) and
after_find( to generate them ). The after_find callback works fine and
renders A and B with the proper values. however, in the Rails Console when I
try to save a new record it gives me this error :

ActiveRecord::StatementInvalid: Mysql::Error: MySQL server has gone away:
SELECT `name` FROM `galleries`     WHERE (`galleries`.name = 'Showcase 1'
AND `galleries`.parent_id IS NULL AND `galleries`.id <> 1)

This happens only when I try to save the record with any modifications to
the description part(there isn't any validation). i.e. when I try changing
the other fields and saving It works perfectly.

And even more puzzling is that this works exactly as it should on my local
development server but running on the Apache server with Passenger on the
web host  it gives the above problems. I have no clue what the problem
exactly is. Please help.

-- 
Ratan . J . Sebastian
**
Vince Lombardi  - "We didn't lose the game; we just ran out of time."
_______________________________________________
Radiant mailing list
Post:   Radiant@radiantcms.org
Search: http://radiantcms.org/mailing-list/search/
Site:   http://lists.radiantcms.org/mailman/listinfo/radiant

Reply via email to