[Radiant] possible bug in page_parts view

Mark Kirby mark at fishladder.co.uk
Sun Mar 9 04:13:02 CDT 2008


Thanks,

I've just dumped the page out as a real page as it doesn't really  
matter all that much.

Mark

On 8 Mar 2008, at 23:58, Aitor Garay-Romero wrote:

>  It could be a limit on the database you are using.  AFAIK MYSQL has  
> a 64K
> limit on TEXT types:
> http://dev.mysql.com/doc/refman/5.0/en/storage-requirements.html .
>
>  Radiant uses a "text" column type to store the content in page parts:
> http://dev.radiantcms.org/browser/trunk/radiant/db/schema.rb .
>
>  /AITOR
>
> On Sat, Mar 8, 2008 at 11:26 PM, Mark Kirby <mark at fishladder.co.uk>  
> wrote:
>
>> I just tried with firefox and it does the same, i normally use  
>> safari.
>>
>> I'm thinking its my code, if i run it and don't view the page in
>> radiant the text is truncated so i have a bug somewhere.
>>
>> Basically i have a page type of static, these are then rendered and
>> added as a child page. Basically i generate one shot reports and
>> wanted to use radiant tags and layouts for them. There is too much
>> data to mine through to do it as a normal page in radiant.
>>
>> Heres the code for reference should anyone spot anything with it.
>>
>> static = Page.find(:all, :conditions => ['class_name =  
>> "StaticPage"'])
>> params = {}
>> static.each do |page|
>>  text = page.render
>>  rendered_page = Page.new
>>  rendered_page.title = "#{page.title}-rendered"
>>  rendered_page.slug = "index"
>>  rendered_ page.breadcrumb = "index"
>>  rendered_ page.parent = page
>>  params = { 'name' => "body", 'filter_id' => "", 'content' => text }
>>  rendered_page.parts.build(params)
>>  rendered_page.save
>> end
>>
>>
>> Size before saving 90306
>> Size after saving 65535
>>
>> It would seem that something above is truncating it.
>>
>> Any one care to point out the obvious error ;) i think im just not
>> seeing wood for the trees now.
>>
>> Thanks
>>
>> mark
>>
>> On 8 Mar 2008, at 20:13, Aitor Garay-Romero wrote:
>>
>>> It could be a browser limit with text areas.  Which browser are your
>>> using?  Google for something like "textarea limit", in the past  
>>> people
>>> reported some problems, for example with Opera.
>>>
>>> /AITOR
>>>
>>> On Sat, Mar 8, 2008 at 12:54 PM, Mark Kirby <mark at fishladder.co.uk>
>>> wrote:
>>>
>>>> Hi,
>>>>
>>>> Im pragmatically creating pages and i have them saving in the
>>>> database
>>>> correctly. The content of the parts body is a large report  
>>>> @text.size
>>>> reports 85147, on checking the content in the database it is all
>>>> there. The problem is that when i edit the page it truncates the
>>>> content. You cannot create the page manually and save it, while the
>>>> text field will hold the text it truncates it on save.
>>>>
>>>> This is odd because the database schema uses a text type for a  
>>>> parts
>>>> content and the views (_part.html.erb) text_area_tag does not
>>>> restrict
>>>> the size. So it should be able to hold the data and as i said it is
>>>> saved in the database correctly its when you view the page that it
>>>> truncates the content.
>>>>
>>>> Any one have any ideas?
>>>>
>>>> Let me know if i should file a bug and i will.
>>>>
>>>> Mark
>>>>
>>>> _______________________________________________
>>>> Radiant mailing list
>>>> Post:   Radiant at radiantcms.org
>>>> Search: http://radiantcms.org/mailing-list/search/
>>>> Site:   http://lists.radiantcms.org/mailman/listinfo/radiant
>>>>
>>> _______________________________________________
>>> Radiant mailing list
>>> Post:   Radiant at radiantcms.org
>>> Search: http://radiantcms.org/mailing-list/search/
>>> Site:   http://lists.radiantcms.org/mailman/listinfo/radiant
>>
>> _______________________________________________
>> Radiant mailing list
>> Post:   Radiant at radiantcms.org
>> Search: http://radiantcms.org/mailing-list/search/
>> Site:   http://lists.radiantcms.org/mailman/listinfo/radiant
>>
> _______________________________________________
> Radiant mailing list
> Post:   Radiant at radiantcms.org
> Search: http://radiantcms.org/mailing-list/search/
> Site:   http://lists.radiantcms.org/mailman/listinfo/radiant



More information about the Radiant mailing list