rendering multiple headers on registration page 'inviteonly'

rendering multiple headers on registration page 'inviteonly'

Issue ID:1180
Issue Category:bug
Component:ui
Priority:normal
Status:active
Assigned:Unassigned
Version:0.7
Milestone:0.7
Keywords:error handling, invite only, register

{{{
$config['site']['inviteonly'] = true;
}}}

With invite-only, the registration page renders duplicate headers. It begins the output of the registration information, then calls to output the form.

Instead of the form, you should see 'Sorry, only invited people can register'. This part is rendered as another complete HTML document, including error messages about output already started:

{{{
Warning: Cannot modify header information - headers already sent by (output started at /nfs/c01/h03/mnt/13715/domains/chat.starpotentialonline.com/html/lib/xmloutputter.php:227) in /nfs/c01/h03/mnt/13715/domains/chat.starpotentialonline.com/html/lib/htmloutputter.php on line 110

Warning: Cannot modify header information - headers already sent by (output started at /nfs/c01/h03/mnt/13715/domains/chat.starpotentialonline.com/html/lib/xmloutputter.php:227) in /nfs/c01/h03/mnt/13715/domains/chat.starpotentialonline.com/html/lib/error.php on line 73
}}}

On a related note, ideally this entire section should also not be rendered:

{{{
With this form you can create a new account. You can then post notices and link up to friends and colleagues. (Have an OpenID? Try our OpenID registration!)
}}}

Since registration is technically closed, why tell the visitor any of this.

Legacy Data

This issue was migrated from another tracking system. The legacy data at time of import is provided below as a reference.

Ticket ID: 
1180
Reported by: 
jackboberg
Owner: 
xeacon
Status: 
assigned
Type: 
bug
Component: 
ui
Priority: 
3
Version: 
0.7.1
Milestone: 
0.7

Updates

#1

Replying to [comment:1 chris]:
> This seems to be the way it is in the current version of the software.

Mind if I reopen to fix this bug?

It seems to be building two "pages" at once incorrectly:
(1) for the "error" of the "invite only" setting
(2) for the actual "registration" page

Each page is building it's own showContentBlock() method, which causes two "pages" to display. We need to add logic to build only one in this case.

Is this something that will happen on other pages with errors? Is this an "error handling"-type issue or unique to Register with Invite Only configuration?

Looking into...

#2

Assigning to myself from evan (unless there are objections).

#3

Should we even show the "Register" link in the Primary Nav if the site is "inviteonly"? It doesn't seem like we should. If this is the case, we can update action.php's logic to check that the site is (1) NOT closed and (2) NOT inviteonly before building the "Register" link. We do want to keep the "Sorry, only invited people can register." on the register.php (tryRegister() method) in case the site changes from "inviteonly = false" to "inviteonly = true" while a user is on the actual registration page.

...

Login or Register to modify this issue, or to receive updates by email.

You can also subscribe to the RSS feed for updates to this issue.