Re: [Radiant] create new page on heroku

2010-08-14 Thread Steven Southard


On Aug 14, 2010, at 4:43 PM, Josh French wrote:

I understand this is basically running on edge, and if Radiant  
wasn't the best CMS, and if everyone's efforts weren't fully a work  
or love I might be bothered by it.


Thanks again for your patience, and do let me know if it works or not.


It works fine now!



Your other extension pagefactory is so great for pre-customizing  
pages for clients.  One thing about it, I didn't see any setting  
for 'filter' illustrated in the examples.  Can that be done?


Yup. You can pass any part attribute to a factory, including the  
filter, although the key is filter_id and not filter:


   part 'filtered', :filter_id => 'Markdown'

(or 'Textile', or...)


I think I was using filter.




Also I think it might be nice if pages could be set for a child of  
certain pages.  It's no big deal to have to choose what type of  
page but I think it would be slick to just automatically be set and  
then not need to think about it again.


Working on that too :) There's been some work in core and on a  
development branch of PageFactory to allow you finer control over  
what pages can be added where, including what you're proposing.  
Eventually you'll be able to (for instance) declare that only  
BlogPostPages can be created under a BlogCategoryPage, and you'd  
automatically get a child of the right type when adding a new one.


j





I look forward to these changes

Steven



Re: [Radiant] create new page on heroku

2010-08-14 Thread Josh French
> I understand this is basically running on edge, and if Radiant wasn't the 
> best CMS, and if everyone's efforts weren't fully a work or love I might be 
> bothered by it. 

Thanks again for your patience, and do let me know if it works or not.

> Your other extension pagefactory is so great for pre-customizing pages for 
> clients.  One thing about it, I didn't see any setting for 'filter' 
> illustrated in the examples.  Can that be done?  

Yup. You can pass any part attribute to a factory, including the filter, 
although the key is filter_id and not filter:

part 'filtered', :filter_id => 'Markdown'

(or 'Textile', or...)

> Also I think it might be nice if pages could be set for a child of certain 
> pages.  It's no big deal to have to choose what type of page but I think it 
> would be slick to just automatically be set and then not need to think about 
> it again.

Working on that too :) There's been some work in core and on a development 
branch of PageFactory to allow you finer control over what pages can be added 
where, including what you're proposing. Eventually you'll be able to (for 
instance) declare that only BlogPostPages can be created under a 
BlogCategoryPage, and you'd automatically get a child of the right type when 
adding a new one.

j



Re: [Radiant] create new page on heroku

2010-08-14 Thread Steven Southard


On Aug 14, 2010, at 11:04 AM, Josh French wrote:

With 9.1 on Heroku I am having a problem saving new pages.  It  
saves pages I made on my localhost just won't make a new one.



Turns out the exact same bug bit core, but I never ported the patch  
over to PageParts. It's been updated now and *should* work, although  
I have neither Postgres nor a Radiant app on Heroku so you'll have  
to be the guinea pig for it -- sorry!


I understand this is basically running on edge, and if Radiant wasn't  
the best CMS, and if everyone's efforts weren't fully a work or love I  
might be bothered by it.  I'll try out the fixed version tonight.





If I take page_parts out and run migrate VERSION=0 radiant won't  
start at all.  Does something change during the setup process that  
has to be undone to remove page_parts?



As for the error you got when it was uninstalled, my guess is that  
something wasn't removed cleanly. Again, I haven't done much on  
Heroku so I'm not sure how they do things; if you can't get your app  
up after re-adding the fixed version of PageParts, let me know and  
I'll take a closer look.


This was local too.  I'll see if what you did fixes this.




And yes, Heroku converts your DB to Postgres behind the scenes. It  
works in most cases, and where it doesn't it helps us flush out this  
sort of bug. Sorry you were the one to find it!



Thanks for your work.  I like this extension and I really want to find  
the right project to use it on.


Your other extension pagefactory is so great for pre-customizing pages  
for clients.  One thing about it, I didn't see any setting for  
'filter' illustrated in the examples.  Can that be done?  Also I think  
it might be nice if pages could be set for a child of certain pages.   
It's no big deal to have to choose what type of page but I think it  
would be slick to just automatically be set and then not need to think  
about it again.


Cheers,


Steven






Re: [Radiant] create new page on heroku

2010-08-14 Thread Josh French
> With 9.1 on Heroku I am having a problem saving new pages.  It saves pages I 
> made on my localhost just won't make a new one.


Turns out the exact same bug bit core, but I never ported the patch over to 
PageParts. It's been updated now and *should* work, although I have neither 
Postgres nor a Radiant app on Heroku so you'll have to be the guinea pig for it 
-- sorry!

>> If I take page_parts out and run migrate VERSION=0 radiant won't start at 
>> all.  Does something change during the setup process that has to be undone 
>> to remove page_parts?  


As for the error you got when it was uninstalled, my guess is that something 
wasn't removed cleanly. Again, I haven't done much on Heroku so I'm not sure 
how they do things; if you can't get your app up after re-adding the fixed 
version of PageParts, let me know and I'll take a closer look.

And yes, Heroku converts your DB to Postgres behind the scenes. It works in 
most cases, and where it doesn't it helps us flush out this sort of bug. Sorry 
you were the one to find it!

j

Re: [Radiant] create new page on heroku

2010-08-13 Thread Steven Southard

This the error I receive without page_parts:

/usr/ruby1.8.7/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in  
`gem_original_require': no such file to load -- /file_page_part  
(MissingSourceFile)
	from /usr/ruby1.8.7/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb: 
31:in `require'


If I put page_parts back in it fixes it locally but won't save on  
Heroku.



Steven




On Aug 13, 2010, at 2:36 PM, Steven Southard wrote:

If I take page_parts out and run migrate VERSION=0 radiant won't  
start at all.  Does something change during the setup process that  
has to be undone to remove page_parts?  Wow, I guess Heroku uses  
Postgress?  I hope you remember.


Cheers,


Steven



On Aug 12, 2010, at 7:10 PM, Josh French wrote:

We ran into this before on another extension, there's an SQL  
difference with Postgres that affects some group queries. I just  
need to remember which one and I'll apply the fix.


j

On Aug 12, 2010, at 6:55 PM, Steven Southard wrote:

With 9.1 on Heroku I am having a problem saving new pages.  It  
saves pages I made on my localhost just won't make a new one.


I get this:

ActiveRecord::StatementInvalid (PGError: ERROR:  invalid input  
syntax for integer: ""
: SELECT * FROM "page_parts" WHERE ("page_parts"."id" IN ('',''))  
AND ("page_parts".page_id = NULL)  ORDER BY id):
/home/slugs/258179_58f1601_b92e/mnt/.gems/gems/ 
will_paginate-2.3.14/lib/will_paginate/finder.rb:170:in  
`method_missing'
radiant (0.9.1) app/controllers/admin/resource_controller.rb:64:in  
`create'


Is there a problem with page_parts or will_paginate-2.3.14?  Any  
ideas?



Cheers,


Steven











Re: [Radiant] create new page on heroku

2010-08-13 Thread Steven Southard
If I take page_parts out and run migrate VERSION=0 radiant won't start  
at all.  Does something change during the setup process that has to be  
undone to remove page_parts?  Wow, I guess Heroku uses Postgress?  I  
hope you remember.


Cheers,


Steven



On Aug 12, 2010, at 7:10 PM, Josh French wrote:

We ran into this before on another extension, there's an SQL  
difference with Postgres that affects some group queries. I just  
need to remember which one and I'll apply the fix.


j

On Aug 12, 2010, at 6:55 PM, Steven Southard wrote:

With 9.1 on Heroku I am having a problem saving new pages.  It  
saves pages I made on my localhost just won't make a new one.


I get this:

ActiveRecord::StatementInvalid (PGError: ERROR:  invalid input  
syntax for integer: ""
: SELECT * FROM "page_parts" WHERE ("page_parts"."id" IN ('',''))  
AND ("page_parts".page_id = NULL)  ORDER BY id):
/home/slugs/258179_58f1601_b92e/mnt/.gems/gems/will_paginate-2.3.14/ 
lib/will_paginate/finder.rb:170:in `method_missing'
radiant (0.9.1) app/controllers/admin/resource_controller.rb:64:in  
`create'


Is there a problem with page_parts or will_paginate-2.3.14?  Any  
ideas?



Cheers,


Steven









Re: [Radiant] create new page on heroku

2010-08-12 Thread Josh French
We ran into this before on another extension, there's an SQL  
difference with Postgres that affects some group queries. I just need  
to remember which one and I'll apply the fix.


j

On Aug 12, 2010, at 6:55 PM, Steven Southard wrote:

With 9.1 on Heroku I am having a problem saving new pages.  It saves  
pages I made on my localhost just won't make a new one.


I get this:

ActiveRecord::StatementInvalid (PGError: ERROR:  invalid input  
syntax for integer: ""
: SELECT * FROM "page_parts" WHERE ("page_parts"."id" IN ('',''))  
AND ("page_parts".page_id = NULL)  ORDER BY id):
 /home/slugs/258179_58f1601_b92e/mnt/.gems/gems/will_paginate-2.3.14/ 
lib/will_paginate/finder.rb:170:in `method_missing'
 radiant (0.9.1) app/controllers/admin/resource_controller.rb:64:in  
`create'


Is there a problem with page_parts or will_paginate-2.3.14?  Any  
ideas?



Cheers,


Steven