I've got a problem: I've made the name like this:
But I don't seem to get an error on duplicate? submit_success: 1
The first entry stays in place, but now the second user also gets a success message, while it should have been something like "place already taken, try again" or something, with all other fields filled like they were...
Everything else seems to work fine (ajax call) I did need to move a loop from couch to javascript side, because it resulted in a memory exhausted fatal error. How many pages can couch handle at a time (in a loop)?
I did this:
at the moment I have 8 activities, total_places 100, 5 subscriptions, all on my local machine, and it just went wrong.
Now I did this and did the loop to check for true/false on the front-end, but since the other one did break very fast, I'm afraid that at some point this might break to. Is there a way to know easily how many records this can handle (other than just filling it manually).
- Code: Select all
<cms:db_persist_form
k_page_name = "<cms:concat p1=frm_activity_id p2='_' p3=frm_place />"
/>
But I don't seem to get an error on duplicate? submit_success: 1
The first entry stays in place, but now the second user also gets a success message, while it should have been something like "place already taken, try again" or something, with all other fields filled like they were...
Everything else seems to work fine (ajax call) I did need to move a loop from couch to javascript side, because it resulted in a memory exhausted fatal error. How many pages can couch handle at a time (in a loop)?
I did this:
at the moment I have 8 activities, total_places 100, 5 subscriptions, all on my local machine, and it just went wrong.
- Code: Select all
<?php require_once( 'couch/cms.php' ); ?>
<cms:template title='Places' clonable='0'>
</cms:template>
<cms:set requestid="<cms:php>
if (isset($_GET['activity_id']) && is_numeric($_GET['activity_id'])){
echo $_GET['activity_id'];
}
</cms:php>" scope='global'/>
<cms:pages masterpage='activities.php' id=requestid >
<cms:if (total_places!='') && (total_places gt '0')>
{
<cms:repeat count=total_places startcount='1' >
<cms:set found='false' scope='global' />
<cms:set place=k_count scope='global' />
<cms:reverse_related_pages masterpage='subscriptions.php' field='activitysubscription'>
<cms:if place_number=place>
<cms:set found='true' scope='global' />
</cms:if>
</cms:reverse_related_pages>
"<cms:show place />":<cms:show found />
<cms:if k_count ne total_places>
,
</cms:if>
</cms:repeat>
}
<cms:else />
false
</cms:if>
</cms:pages>
Now I did this and did the loop to check for true/false on the front-end, but since the other one did break very fast, I'm afraid that at some point this might break to. Is there a way to know easily how many records this can handle (other than just filling it manually).
- Code: Select all
<?php require_once( 'couch/cms.php' ); ?>
<cms:template title='Places' clonable='0'>
</cms:template>
<cms:set requestid="<cms:php>
if (isset($_GET['activity_id']) && is_numeric($_GET['activity_id'])){
echo $_GET['activity_id'];
}
</cms:php>" scope='global'/>
<cms:pages masterpage='activities.php' id=requestid >
<cms:if (total_places!='') && (total_places gt '0')>
{
"total_places":<cms:show total_places />,
"taken":[
<cms:reverse_related_pages masterpage='subscriptions.php' field='activitysubscription'>
<cms:show place_number />
<cms:if k_count ne k_record_to>
,
</cms:if>
</cms:reverse_related_pages>
]
}
<cms:else />
false
</cms:if>
</cms:pages>
<?php COUCH::invoke(); ?>