[wp-trac] [WordPress Trac] #39311: New user activation welcome page links to the wrong site

WordPress Trac noreply at wordpress.org
Sun Jan 1 21:13:06 UTC 2017


#39311: New user activation welcome page links to the wrong site
-------------------------------------+------------------------------
 Reporter:  tmoore41                 |       Owner:
     Type:  defect (bug)             |      Status:  new
 Priority:  normal                   |   Milestone:  Awaiting Review
Component:  Login and Registration   |     Version:  4.7
 Severity:  normal                   |  Resolution:
 Keywords:  has-patch needs-testing  |     Focuses:  multisite
-------------------------------------+------------------------------

Comment (by tmoore41):

 Replying to [comment:18 Ipstenu]:
 > Okay, NOW we're making progress!
 >
 > You have a heavily customized install :)

 I do not have a heavily customized install.  This problem would also occur
 on a vanilla wordpress install if the htaccess rules blocked access to the
 main site (not an unreasonable thing to do for some use cases).

 > That's important for us to know to debug.

 No debugging is required.  See my original post in this thread.  The
 problem is obvious in the code.

 > The main site (example.com) is meant to be a publicly viewable site.

 This would appear to be a regression from former behaviour because I did
 not see this happening several releases ago on my same setup.

 > Obviously there are ways around it, like WordPress.com (not sure how
 they did it TBH). But by making it so example.com is NOT accessible at
 all, that's why this happened. If it was, just as a landing page or what
 have you, it should properly redirect people where they need to go.
 >
 > > All I am concerned about here are the links on the welcome page. It
 seems to be an artificial restriction
 > > that I must have have a publicly accessible main site so that magic
 redirection works, when it is trivially
 > > easy to change the welcome page to avoid this. Honestly, what is the
 principle behind this? Why does
 > > magic redirection have to be used in this case, when it is so easy to
 avoid?
 >
 > You're falling to the original intent of WordPress Multisite, which was
 to manage a network of related, but not fully interconnected sites. That's
 why knowing the history of a thing helps us debug and why I was digging
 into the history of what YOU are doing. :) With the right information, we
 can understand the real problem based on your real intent.
 >
 > So!
 >
 > Why is yours breaking?
 >
 > Because your main site isn't 'not accessible to login' but 'not
 accessible AT ALL.' Meaning, as I understand it, if I went to your
 example.com, I would be blocked.

 No, if you went to 'example.com' you would be presented with a login page.
 If you were a registered user and had the correct password then you could
 access the site.

 > You can use
 https://developer.wordpress.org/reference/hooks/wpmu_signup_user_notification_email/
 to rewrite the email so it links to the per-site :)

 You are misunderstanding the problem stated in the original post.  The
 email invitation links to the correct page.  It is the welcome message
 that is sent after the activation that links to the wrong site.  This is
 trivially easy to fix, although I defer to @Mista-Flo and @johnjamesjacoby
 that the activation process should be fixed in a more thorough manner.



 I'm not looking for technical support here.  As mentioned in the original
 post I made a one-line change that fixed the problem for me.  I just
 wanted to report this defect to the core project so that other people were
 made aware of it.  I would be happy to answer any other questions about
 the issue if it would help to get it resolved.

--
Ticket URL: <https://core.trac.wordpress.org/ticket/39311#comment:19>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list