Forum
PerchSystem::redirect(); blocking rendering in Perch 3 and Members
I've got a site where users login via a page called /login/. On entering their details, it should direct the user to the page /feeds/. However, it stays on the login page and blocks rendering of anything below it.
This is the code below:
<?php if(perch_member_logged_in()): ?>
<?php PerchSystem::redirect('/feeds'); ?>
<?php else: ?>
<div class="feeds">
<?php perch_members_login_form(); ?>
</div>
<?php endif; ?>
Anyone able to spot what is blocking rendering?
What is in your error log?
You can't redirect (which is sending an HTTP header) after you've begun outputting the response body.