You can send it to wanwizard<at>fuelphp.com, and explain what exactly I have to do to reproduce it.lokman4844 wrote on Friday 29th of June 2012:i'll send you out the whole apps. btw, I notice it happens if i change the input type to select or radio. Where should I send the code Harro?
Harro Verton wrote on Saturday 30th of June 2012:Thanks for sending me the code. I'll reply here so others might benefit from it. The message has nothing to do with redirects. Your application uses a cookie to store all session data (which is the default, and you haven't configured anything else). The maximum size of a cookie payload is 4Kb, this is a browser limit (and probably limited by the HTTP header line length). When submitting the contacts form, you store all validation objects (so not the errors but the objects themselfs) into the session. Which after serializing and encrypting makes the payload 79823 bytes, clearly more then the maximum of 4Kb. So the error message is absolutely correct. Either find a more efficient means of storing the messages in the session (or don't store them at all but pass them directly to the view as a variable), or choose a different session storage mechanism that doesn't have the 4Kb limit.
// instead of doing Session::set_flash('error', $val->error()); // do $this->template->set('val', $val);Then in the template view
// replace <?php if (Session::get_flash('error')): ?> <div class="alert-message error"> <p> <?php echo implode('</p><p>', e((array) Session::get_flash('error'))); ?> </p> </div> <?php endif; ?> // by <?php if (isset($val)): ?> <div class="alert-message error"> <?php foreach($val->error() as $e): ?> echo $e->get_message(false, '<p>', '</p>'); <?php endforeach; ?> </div> <?php endif; ?>If you want this for everything you generate, copy the views from the oil package to app/views (maintain the same folder structure) and modify them there. Next time you generate something your custom views will be used.
$view->set( 'valid', $valid, false );don't forget that this passes fieldnames and values (as they can be part of the error message) to the view unescaped, so use the e() function to escape them when you echo them.
It looks like you're new here. If you want to get involved, click one of these buttons!