[Radiant] MySQL Server has gone away error using before_save callback

2009-05-14 Thread Jean Valjean
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


[Radiant] How does using Keywords page part differ from using the Tags extension?

2009-05-14 Thread N. Turnage
They look like they accomplish the same thing. Why would you use one 
over the other? Or use both on the same site?



~Nate
___
Radiant mailing list
Post:   Radiant@radiantcms.org
Search: http://radiantcms.org/mailing-list/search/
Site:   http://lists.radiantcms.org/mailman/listinfo/radiant


Re: [Radiant] Comments extension

2009-05-14 Thread Rafael Souza
I saw the code and I think that, to make the comments unapproved for
default, the way is to comment the line seven of comment.rb model:
"#before_save :auto_approve"

Can someone tells me if this is the best way?

Thanks,

Rafael Souza

On Thu, May 14, 2009 at 6:15 PM, Rafael Souza  wrote:

> The home comments was only for test, the blog comments works fine now! =]
>
> One more doubt, how can I turn the comments moderated? For show in page
> only after approved?
>
> Thanks Jim, helped me a lot!
>
>
> On Thu, May 14, 2009 at 5:29 PM, Jim Gay  wrote:
>
>> This is a bug in the extension.
>> It submits comments to the_page_url/comments and sets up routes to catch
>> that and send it to the comments controller.
>> We'll need to make an exception for the home page and perhaps create a
>> custom route for it.
>>
>> Are you really accepting comments on your home page, or are you accepting
>> comments on content listed on the homepage but actually saved in another
>> location? It's possible that you might need to alter your radius code if
>> that is the case.
>>
>>
>> On May 14, 2009, at 4:18 PM, Rafael Souza wrote:
>>
>>  I'm having trouble using the comments extension.
>>>
>>> Just for test, I put  in the home(/) of the
>>> website.
>>> And this shows the form to comment, but when a try to comment, this
>>> redirects (form submit) to mysite/comments (a 404 error) and my comment
>>> isn't saved...
>>>
>>> Anyone know how I fix it?
>>>
>>> Thanks
>>>
>>
>> Jim Gay
>> http://www.saturnflyer.com
>>
>>
>>
>> ___
>> Radiant mailing list
>> Post:   Radiant@radiantcms.org
>> Search: http://radiantcms.org/mailing-list/search/
>> Site:   http://lists.radiantcms.org/mailman/listinfo/radiant
>>
>
>
___
Radiant mailing list
Post:   Radiant@radiantcms.org
Search: http://radiantcms.org/mailing-list/search/
Site:   http://lists.radiantcms.org/mailman/listinfo/radiant


Re: [Radiant] Comments extension

2009-05-14 Thread Rafael Souza
The home comments was only for test, the blog comments works fine now! =]

One more doubt, how can I turn the comments moderated? For show in page only
after approved?

Thanks Jim, helped me a lot!

On Thu, May 14, 2009 at 5:29 PM, Jim Gay  wrote:

> This is a bug in the extension.
> It submits comments to the_page_url/comments and sets up routes to catch
> that and send it to the comments controller.
> We'll need to make an exception for the home page and perhaps create a
> custom route for it.
>
> Are you really accepting comments on your home page, or are you accepting
> comments on content listed on the homepage but actually saved in another
> location? It's possible that you might need to alter your radius code if
> that is the case.
>
>
> On May 14, 2009, at 4:18 PM, Rafael Souza wrote:
>
>  I'm having trouble using the comments extension.
>>
>> Just for test, I put  in the home(/) of the
>> website.
>> And this shows the form to comment, but when a try to comment, this
>> redirects (form submit) to mysite/comments (a 404 error) and my comment
>> isn't saved...
>>
>> Anyone know how I fix it?
>>
>> Thanks
>>
>
> Jim Gay
> http://www.saturnflyer.com
>
>
>
> ___
> Radiant mailing list
> Post:   Radiant@radiantcms.org
> Search: http://radiantcms.org/mailing-list/search/
> Site:   http://lists.radiantcms.org/mailman/listinfo/radiant
>
___
Radiant mailing list
Post:   Radiant@radiantcms.org
Search: http://radiantcms.org/mailing-list/search/
Site:   http://lists.radiantcms.org/mailman/listinfo/radiant


Re: [Radiant] Comments extension

2009-05-14 Thread Jim Gay

This is a bug in the extension.
It submits comments to the_page_url/comments and sets up routes to  
catch that and send it to the comments controller.
We'll need to make an exception for the home page and perhaps create a  
custom route for it.


Are you really accepting comments on your home page, or are you  
accepting comments on content listed on the homepage but actually  
saved in another location? It's possible that you might need to alter  
your radius code if that is the case.


On May 14, 2009, at 4:18 PM, Rafael Souza wrote:


I'm having trouble using the comments extension.

Just for test, I put  in the home(/) of  
the

website.
And this shows the form to comment, but when a try to comment, this
redirects (form submit) to mysite/comments (a 404 error) and my  
comment

isn't saved...

Anyone know how I fix it?

Thanks


Jim Gay
http://www.saturnflyer.com



___
Radiant mailing list
Post:   Radiant@radiantcms.org
Search: http://radiantcms.org/mailing-list/search/
Site:   http://lists.radiantcms.org/mailman/listinfo/radiant


[Radiant] Comments extension

2009-05-14 Thread Rafael Souza
I'm having trouble using the comments extension.

Just for test, I put  in the home(/) of the
website.
And this shows the form to comment, but when a try to comment, this
redirects (form submit) to mysite/comments (a 404 error) and my comment
isn't saved...

Anyone know how I fix it?

Thanks
___
Radiant mailing list
Post:   Radiant@radiantcms.org
Search: http://radiantcms.org/mailing-list/search/
Site:   http://lists.radiantcms.org/mailman/listinfo/radiant


Re: [Radiant] Templates Extension: Important Update

2009-05-14 Thread N. Turnage

Andrew vonderLuft wrote:

I would try this:
$ rake radiant:extensions:templates:migrate VERSION=8
$ rake radiant:extensions:templates:migrate

This will roll you back to migration 8, and then re-migrate 9 and 10.
 migration 9 will create the boolean part_type which you appear to be
missing.
  


Won't that destroy the data the templates I already have set up? And 
will the pages based on those templates be affected?



~Nate
___
Radiant mailing list
Post:   Radiant@radiantcms.org
Search: http://radiantcms.org/mailing-list/search/
Site:   http://lists.radiantcms.org/mailman/listinfo/radiant


Re: [Radiant] Templates Extension: Important Update

2009-05-14 Thread Andrew vonderLuft
I would try this:
$ rake radiant:extensions:templates:migrate VERSION=8
$ rake radiant:extensions:templates:migrate

This will roll you back to migration 8, and then re-migrate 9 and 10.
 migration 9 will create the boolean part_type which you appear to be
missing.

Andrew

On Thu, May 14, 2009 at 12:53 PM, N. Turnage  wrote:

> Andrew vonderLuft wrote:
>
>> To anyone using Templates extension with Radiant 0.7 or greater:
>>
>> We discovered an issue today which could cause the creation of a child
>> page with a nil parent_id.  The scenario is when you create a new child page
>> with a given template, and then change the template before the initial save.
>>  In this case the parent_id is lost.  We corrected this by updating the
>> switch_templates partial to conform to RESTful routes.
>>
>> So if you are using Template Extension with Radiant 0.7, be sure to pull
>> from master.
>>
>
>
> I am having problems trying to upgrade the templates extension. I upgraded
> from commit 0f3043d to commit a0b19b2 so I already had migration 009. When I
> migrated 010 this was the error: http://pastie.org/478375
>
> How can I migrate the db to 010 without having to go back to 008 and
> migrate up?
>
>
>
>
> ~Nate
> ___
> Radiant mailing list
> Post:   Radiant@radiantcms.org
> Search: http://radiantcms.org/mailing-list/search/
> Site:   http://lists.radiantcms.org/mailman/listinfo/radiant
>
___
Radiant mailing list
Post:   Radiant@radiantcms.org
Search: http://radiantcms.org/mailing-list/search/
Site:   http://lists.radiantcms.org/mailman/listinfo/radiant


Re: [Radiant] Templates Extension: Important Update

2009-05-14 Thread N. Turnage

Andrew vonderLuft wrote:

To anyone using Templates extension with Radiant 0.7 or greater:

We discovered an issue today which could cause the creation of a child 
page with a nil parent_id.  The scenario is when you create a new 
child page with a given template, and then change the template before 
the initial save.  In this case the parent_id is lost.  We corrected 
this by updating the switch_templates partial to conform to RESTful 
routes.


So if you are using Template Extension with Radiant 0.7, be sure to 
pull from master.



I am having problems trying to upgrade the templates extension. I 
upgraded from commit 0f3043d to commit a0b19b2 so I already had 
migration 009. When I migrated 010 this was the error: 
http://pastie.org/478375


How can I migrate the db to 010 without having to go back to 008 and 
migrate up?




~Nate
___
Radiant mailing list
Post:   Radiant@radiantcms.org
Search: http://radiantcms.org/mailing-list/search/
Site:   http://lists.radiantcms.org/mailman/listinfo/radiant


Re: [Radiant] Problem with Extensions

2009-05-14 Thread Mohit Sindhwani

john muhl wrote:

http://wiki.github.com/radiant/radiant/installing-extensions
  
This is my Homer Simpson moment.  Ever since the wiki moved from 
Junebug, I haven't properly connected with it (I think it's the color 
scheme!).  I shall be more diligent :)


Cheers,
Mohit.
5/14/2009 | 11:53 PM.

___
Radiant mailing list
Post:   Radiant@radiantcms.org
Search: http://radiantcms.org/mailing-list/search/
Site:   http://lists.radiantcms.org/mailman/listinfo/radiant



Re: [Radiant] Problem with Extensions

2009-05-14 Thread N. Turnage

Mohit Sindhwani wrote:

Emanuel Vinzent wrote:

thank's!

with the underscores in the directiories will should be work ;-)
  
With the advent of git, we need a FAQ that explains how to rename 
extension directories after the extension is cloned to 
vendor/extensions.  I guess there's a clean way to guess the directory 
name by looking at the _extension.rb in the newly created 
directory?


Examples:
* when it's blog_tags_extension.rb -> the directory should be blog_tags;
* similarly, it's page_attachments when the file is called 
page_attachments_extension.rb

* and simply enough, gallery when the file is gallery_extension.rb

This should be foolproof, isn't it?  Are there any known extensions 
that tend to use CamelCase (guess not!) or dashed-names (theoretically 
possible, but I haven't seen any).


Or you could just use Ray to install extensions. If you manage your 
project with git, this is super easy to use. And if it, for some reason, 
can't install an extension, there is always "git submodule add". Ray is 
now the first extension I add to a project.


The only extension that throws me for a loop when I install it is the 
"radiant-extensions-extension". Try searching for that one in github. 
Searching "radiant extension" returns all of them.





~Nate
___
Radiant mailing list
Post:   Radiant@radiantcms.org
Search: http://radiantcms.org/mailing-list/search/
Site:   http://lists.radiantcms.org/mailman/listinfo/radiant


Re: [Radiant] Problem with Extensions

2009-05-14 Thread Emanuel Vinzent
Sry,

thanks, now work's fine! ;-)

2009/5/14 john muhl 

> http://wiki.github.com/radiant/radiant/installing-extensions
>
> On Thu, May 14, 2009 at 9:02 AM, Mohit Sindhwani  wrote:
> > Emanuel Vinzent wrote:
> >>
> >> thank's!
> >>
> >> with the underscores in the directiories will should be work ;-)
> >>
> >
> > With the advent of git, we need a FAQ that explains how to rename
> extension
> > directories after the extension is cloned to vendor/extensions.  I guess
> > there's a clean way to guess the directory name by looking at the
> > _extension.rb in the newly created directory?
> >
> > Examples:
> > * when it's blog_tags_extension.rb -> the directory should be blog_tags;
> > * similarly, it's page_attachments when the file is called
> > page_attachments_extension.rb
> > * and simply enough, gallery when the file is gallery_extension.rb
> >
> > This should be foolproof, isn't it?  Are there any known extensions that
> > tend to use CamelCase (guess not!) or dashed-names (theoretically
> possible,
> > but I haven't seen any).
> >
> > Cheers,
> > Mohit.
> > 5/14/2009 | 11:02 PM.
> >
> >
> > ___
> > Radiant mailing list
> > Post:   Radiant@radiantcms.org
> > Search: http://radiantcms.org/mailing-list/search/
> > Site:   http://lists.radiantcms.org/mailman/listinfo/radiant
> >
> ___
> Radiant mailing list
> Post:   Radiant@radiantcms.org
> Search: http://radiantcms.org/mailing-list/search/
> Site:   http://lists.radiantcms.org/mailman/listinfo/radiant
>
___
Radiant mailing list
Post:   Radiant@radiantcms.org
Search: http://radiantcms.org/mailing-list/search/
Site:   http://lists.radiantcms.org/mailman/listinfo/radiant


Re: [Radiant] Problem with Extensions

2009-05-14 Thread john muhl
http://wiki.github.com/radiant/radiant/installing-extensions

On Thu, May 14, 2009 at 9:02 AM, Mohit Sindhwani  wrote:
> Emanuel Vinzent wrote:
>>
>> thank's!
>>
>> with the underscores in the directiories will should be work ;-)
>>
>
> With the advent of git, we need a FAQ that explains how to rename extension
> directories after the extension is cloned to vendor/extensions.  I guess
> there's a clean way to guess the directory name by looking at the
> _extension.rb in the newly created directory?
>
> Examples:
> * when it's blog_tags_extension.rb -> the directory should be blog_tags;
> * similarly, it's page_attachments when the file is called
> page_attachments_extension.rb
> * and simply enough, gallery when the file is gallery_extension.rb
>
> This should be foolproof, isn't it?  Are there any known extensions that
> tend to use CamelCase (guess not!) or dashed-names (theoretically possible,
> but I haven't seen any).
>
> Cheers,
> Mohit.
> 5/14/2009 | 11:02 PM.
>
>
> ___
> Radiant mailing list
> Post:   Radiant@radiantcms.org
> Search: http://radiantcms.org/mailing-list/search/
> Site:   http://lists.radiantcms.org/mailman/listinfo/radiant
>
___
Radiant mailing list
Post:   Radiant@radiantcms.org
Search: http://radiantcms.org/mailing-list/search/
Site:   http://lists.radiantcms.org/mailman/listinfo/radiant


Re: [Radiant] Problem with Extensions

2009-05-14 Thread Mohit Sindhwani

Emanuel Vinzent wrote:

thank's!

with the underscores in the directiories will should be work ;-)
  
With the advent of git, we need a FAQ that explains how to rename 
extension directories after the extension is cloned to 
vendor/extensions.  I guess there's a clean way to guess the directory 
name by looking at the _extension.rb in the newly created directory?


Examples:
* when it's blog_tags_extension.rb -> the directory should be blog_tags;
* similarly, it's page_attachments when the file is called 
page_attachments_extension.rb

* and simply enough, gallery when the file is gallery_extension.rb

This should be foolproof, isn't it?  Are there any known extensions that 
tend to use CamelCase (guess not!) or dashed-names (theoretically 
possible, but I haven't seen any).


Cheers,
Mohit.
5/14/2009 | 11:02 PM.


___
Radiant mailing list
Post:   Radiant@radiantcms.org
Search: http://radiantcms.org/mailing-list/search/
Site:   http://lists.radiantcms.org/mailman/listinfo/radiant


Re: [Radiant] Problem with Extensions

2009-05-14 Thread Emanuel Vinzent
thank's!

with the underscores in the directiories will should be work ;-)

2009/5/14 N. Turnage 

> Emanuel Vinzent wrote:
>
>> Hello all,
>>
>> i have a problem with installing Extensions,
>>
>> the error-message
>>
>> Could not load extension from file: drag-order_extension.
>> #
>> rake aborted!
>> You have a nil object when you didn't expect it!
>> You might have expected an instance of Array.
>> The error occurred while evaluating nil.+
>>
>> the directory drag_ordner is on vendor/drag-order
>>
>> any ideas?
>>
>>
>
> First off, which version of Radiant are you using? And second, you'll want
> to name your directories for your extensions using underscores ( _ ) instead
> of dashes ( - ).
>
> I have never used that extension, but I would check compatibility with the
> version of Radiant you are using.
>
>
>
> ~Nate
> ___
> Radiant mailing list
> Post:   Radiant@radiantcms.org
> Search: http://radiantcms.org/mailing-list/search/
> Site:   http://lists.radiantcms.org/mailman/listinfo/radiant
>
___
Radiant mailing list
Post:   Radiant@radiantcms.org
Search: http://radiantcms.org/mailing-list/search/
Site:   http://lists.radiantcms.org/mailman/listinfo/radiant


Re: [Radiant] Problem with Extensions

2009-05-14 Thread N. Turnage

Emanuel Vinzent wrote:

Hello all,

i have a problem with installing Extensions,

the error-message

Could not load extension from file: drag-order_extension.
#
rake aborted!
You have a nil object when you didn't expect it!
You might have expected an instance of Array.
The error occurred while evaluating nil.+

the directory drag_ordner is on vendor/drag-order

any ideas?
  


First off, which version of Radiant are you using? And second, you'll 
want to name your directories for your extensions using underscores ( _ 
) instead of dashes ( - ).


I have never used that extension, but I would check compatibility with 
the version of Radiant you are using.




~Nate
___
Radiant mailing list
Post:   Radiant@radiantcms.org
Search: http://radiantcms.org/mailing-list/search/
Site:   http://lists.radiantcms.org/mailman/listinfo/radiant


[Radiant] Problem with Extensions

2009-05-14 Thread Emanuel Vinzent
Hello all,

i have a problem with installing Extensions,

the error-message

Could not load extension from file: drag-order_extension.
#
rake aborted!
You have a nil object when you didn't expect it!
You might have expected an instance of Array.
The error occurred while evaluating nil.+

the directory drag_ordner is on vendor/drag-order

any ideas?

greets
emanuel
___
Radiant mailing list
Post:   Radiant@radiantcms.org
Search: http://radiantcms.org/mailing-list/search/
Site:   http://lists.radiantcms.org/mailman/listinfo/radiant