Problems, need help? Have a tip or advice? Post it here.
20 posts Page 1 of 2
Hey there,

I have over 200 repeated elements from a single tag in one of my templates. For some reason, im no longer able to add any more to the ever growing list. Is there a limit somewhere that can be adjusted?

Thanks!

- Charlie
Hello, there is a limit due to certain mysql restrictions. If your repeatable region stored videofiles, this limit would come much sooner, maybe after 10 records :)
In short, you must use cloned pages.

Transfer of data to cloned pages form this repeatable region will be easy if automated. Should be done with 'cms:db_persist' tag which can create cloned pages and store info in editables.
Thanks for the reply!

I was afraid of that.. im not storing videofiles just lines of text. Is there a way to increase the mysql limitations? Im afraid cloned pages wont work in my case!

- Charlie
cjcort wrote: Is there a way to increase the mysql limitations?

No, it has already filled max volume of possible data for one repeatable region.

Im afraid cloned pages wont work in my case!

Anyway you can create additional repeatable field and use it till it's maxed-out again. Once second space is depleted, create another one etc.
Hey Tendoman!

So it looks like you helped me out with my first issue, which was to enable repeatable regions in a javascript file. Thank you for that, it worked great!

viewtopic.php?f=4&t=11048

Now, as discussed above, im having the issue of reaching the limits for my repeatable region. I was able to successfully clone the repeatable region so now i have 2... but I still seem to be hitting this same limit anyway :(

I feel like im close to making this work, but I need the 2 repeatable regions to be WITHIN a single <script> tag in order for this very testy javascript code to work properly.

Below is my code, which is not working because i have 2 <script> tags gumming up the works.

Inline Javascript

Code: Select all
<cms:pages masterpage='templates/cluster.php'>
<cms:show_repeatable 'cluster' startcount='1'>
<cms:if k_count = '1' >
<script>
var markers = [
</cms:if>
{
    "project":"<h7><cms:show project /></h7>",
    "citystate":"<cms:show citystate />",
    "what":"<cms:show what />",
    "architect":"<cms:show architect />",
    'url':'<cms:show url />',
    "lat":<cms:show lat />,
    "lng":<cms:show lng />
}<cms:if k_count lt k_total_records >,
<cms:else />
];
</script>
</cms:if>
</cms:show_repeatable>

<cms:show_repeatable 'cluster2' startcount='1'>
<cms:if k_count = '1' >
<script>
var markers = [
</cms:if>
{
    "project":"<h7><cms:show project /></h7>",
    "citystate":"<cms:show citystate />",
    "what":"<cms:show what />",
    "architect":"<cms:show architect />",
    'url':'<cms:show url />',
    "lat":<cms:show lat />,
    "lng":<cms:show lng />
}<cms:if k_count lt k_total_records >,
<cms:else />
];
</script>
</cms:if>
</cms:show_repeatable>
</cms:pages>



Code in "cluster" template file

Code: Select all
<cms:template title='Location Map' order='3'>

   <cms:repeatable name='cluster' label='Location Cluster'>
      
      <cms:editable name='project' label='Project Name' type='text'></cms:editable>
      <cms:editable name='citystate' label='City, State' type='text'></cms:editable>
      <cms:editable name='what' label='Project Type' type='text'></cms:editable>
      <cms:editable name='architect' label='Architect' type='text'></cms:editable>
      <cms:editable name='url' label='URL' type='nicedit'></cms:editable>
      <cms:editable name='lat' label='Latitude' type='text'></cms:editable>
      <cms:editable name='lng' label='Longitude' type='text'></cms:editable>
      
    </cms:repeatable>
   
    <cms:repeatable name='cluster2' label='Location Cluster 2'>
      
      <cms:editable name='project' label='Project Name' type='text'></cms:editable>
      <cms:editable name='citystate' label='City, State' type='text'></cms:editable>
      <cms:editable name='what' label='Project Type' type='text'></cms:editable>
      <cms:editable name='architect' label='Architect' type='text'></cms:editable>
      <cms:editable name='url' label='URL' type='nicedit'></cms:editable>
      <cms:editable name='lat' label='Latitude' type='text'></cms:editable>
      <cms:editable name='lng' label='Longitude' type='text'></cms:editable>
      
    </cms:repeatable>
   
</cms:template>



Thanks again for all your help!
Following is an adaptation to multiple repeatables. ;)

Code: Select all

<cms:pages masterpage='templates/cluster.php'>
    <cms:capture into='markers' >
    <cms:show_repeatable 'cluster' startcount='1' >
        {

            "project":"<h7><cms:show project /></h7>",
            "citystate":"<cms:show citystate />",
            "what":"<cms:show what />",
            "architect":"<cms:show architect />",
            'url':'<cms:show url />',
            "lat":<cms:show lat />,
            "lng":<cms:show lng />

        }<cms:if k_count lt k_total_records >,</cms:if>


    </cms:show_repeatable>

    <cms:show_repeatable 'cluster2' startcount='1'>

        <cms:if k_count = '1' >,</cms:if>

        {
            "project":"<h7><cms:show project /></h7>",
            "citystate":"<cms:show citystate />",
            "what":"<cms:show what />",
            "architect":"<cms:show architect />",
            'url':'<cms:show url />',
            "lat":<cms:show lat />,
            "lng":<cms:show lng />
        }<cms:if k_count lt k_total_records >,</cms:if>


    </cms:show_repeatable>
    </cms:capture>
</cms:pages>

<cms:if "<cms:not_empty markers />">
    <script>
        var markers = [

            <cms:show markers />

        ];
    </script>
</cms:if>

cjcort wrote: Now, as discussed above, im having the issue of reaching the limits for my repeatable region. I was able to successfully clone the repeatable region so now i have 2... but I still seem to be hitting this same limit anyway :(

Sure, every single repeatable region will have its limit. So add as more as you need with 'repeat' tag:
Code: Select all
<cms:template title='Location Map' order='3'>

   <cms:repeatable name="cluster" label="Location Cluster">

      <cms:editable name='project' label='Project Name' type='text'></cms:editable>
      <cms:editable name='citystate' label='City, State' type='text'></cms:editable>
      <cms:editable name='what' label='Project Type' type='text'></cms:editable>
      <cms:editable name='architect' label='Architect' type='text'></cms:editable>
      <cms:editable name='url' label='URL' type='nicedit'></cms:editable>
      <cms:editable name='lat' label='Latitude' type='text'></cms:editable>
      <cms:editable name='lng' label='Longitude' type='text'></cms:editable>

    </cms:repeatable>

   <cms:repeat count='5' startcount='2'>
   <cms:repeatable name="cluster<cms:show k_count />" label="Location Cluster <cms:show k_count />">

      <cms:editable name='project' label='Project Name' type='text'></cms:editable>
      <cms:editable name='citystate' label='City, State' type='text'></cms:editable>
      <cms:editable name='what' label='Project Type' type='text'></cms:editable>
      <cms:editable name='architect' label='Architect' type='text'></cms:editable>
      <cms:editable name='url' label='URL' type='nicedit'></cms:editable>
      <cms:editable name='lat' label='Latitude' type='text'></cms:editable>
      <cms:editable name='lng' label='Longitude' type='text'></cms:editable>

    </cms:repeatable>
   </cms:repeat>

</cms:template>


How many markers do you expect to have totally?
Awesome! I'll give this a shot as soon as I get home from work!

Hopefully she wont add many more locations to this already very crowded map, but you never know... :roll:

Thanks again!
@trendoman, you remarked -
there is a limit due to certain mysql restrictions. If your repeatable region stored videofiles, this limit would come much sooner, maybe after 10 records

There, of course, is an upper limit but in this case it is 4GB (data is stored in a 'long_text' column). So, I don't think it is MySQL limit that is causing the trouble.

What is more probable are the following two directives in php.ini -
1. post_max_size
2. max_input_vars

Suppose a repeatable-region has been defined with 5 inputs and you create 200 rows - that would amount to a total of 1000 inputs being submitted (POSTed) with the form while saving the page.

That could cause both the 'post_max_size' and the 'max_input_vars' limit to be exceeded.

In fact, we had a discussion on this very issue some time back - viewtopic.php?f=4&t=10414

Please try setting higher values for both and that should help.
@KK, this is a good point. I honestly thought that 4GB of LONGTEXT was reached before I saw real editables definition.
Anyway, managing of 200+ rows is a pain for the enduser, so upping the php limit would be worse than putting each repeatable in a separate group (to make them collapsed), order groups from recent to oldest and, in its best, convert the whole shebang to cloned pages :roll:

@cjcort cloned pages would allow your client to 'unpublish' a marker without deleting it from database, quickly find a marker by its name, make any kind of selection or report (e.g. 'Show all projects by a certain architect' or 'Show projects on map by a chosen city '). Then with the infobox on map it would be possible to add images, extra info like address or phone number.
It will be manageable and pleasant to work with. More features (sorting, ordering, custom map markers, filters) may bring you more money for this job.
20 posts Page 1 of 2

Who is online

In total there are 8 users online :: 1 registered, 0 hidden and 7 guests
(based on users active over the past 5 minutes)

Users browsing this forum: Google [Bot] and 7 guests