March 30, 2012 at 12:41 pm #5965
Hello I have set up 2 separate WP installations that share a common database and both sites use the same user_table and user_meta_table. Both sites also have WP eMember installed.
I have followed the instructions according to the explanation on this site:
Let’s call site A the master and site B the slave site. I created the slave site by cloning the master site initially, this included all the plugins. I imported the WP users on site B using WP-eMember and the login using the login widget works perfectly on both sites as does the root cookie plugin.
However when I log out using the widget it works perfectly on the master site but on the slave site login takes to the WordPress login instead of the login page on the slave site. The pages/forms have been set correctly in WP-eMember plug in on the Slave site. However instead of going to http://www.slavesite.com/member-login/ upon logout I am redirected to http://www.slavesite.com/wp-login.php?redirect_to=http%3A%2F%2Fwww.slavesite.com%2Fwp-admin%2F&reauth=1
The above example is for an admin but the same thing happens for a normal user.
Is there a remedy?March 31, 2012 at 3:05 am #43560
This type of setup is not supported in eMember as it is not a supported feature of WordPress. It is explained on our eMember F.A.Q Page:
With that said, Does the login operation work with this hack you did? The issue is just the after logout redirection on the 2nd site?March 31, 2012 at 3:11 am #43561
Yes the login works perfectly, it is only logout redirection on the 2nd site. All I really want to do is share a set of users on 2 different sites. I would be quite happy if they were only able to register on the 1st site but I do need content protection on the 2nd and I do need the 2 sites to have the same set of members.
Independent logging in and out would be fine by me.
ConradMarch 31, 2012 at 7:33 am #43562
What value do you have in the following field of the 2nd site where the logout redirection is not working?
eMember settings -> Pages/Forms Settings -> After Logout Page
If you don’t have any value there already, have you tried entering a value there?March 31, 2012 at 2:03 pm #43563
Sorry I thought that my initial post made that clear, I have specified the login page to be.
If I copy and paste the value into the browser address bar the page works fine. So something is causing that value to be ignored? I have always filled that value in the past; I presume that leaving it blank causes the wordpress login to be displayed? That is what is happening.March 31, 2012 at 11:14 pm #43564
The field I told you to check is different than the login page field. There is another field in eMember where you can set an “After Logout” redirection. Since your redirection is failing after the logout it is worth checking that field’s value and not leave it blank. To me it is not clear that you placed a URL value in the “After Logout Page” field even after your last post because you mentioned *login page* only.March 31, 2012 at 11:44 pm #43565
Sorry logout! logout! I do and always have had the correct URL in the correct settings for the ‘After Logout Page’.
Try to consider me to be of medium ability not a complete numpty I just type too fast and don’t proof read too well. Usually because I up far too late messing around with websites, something I am sure many of us are familiar with
Perhaps I can see what is actually being called by using Firebug? For some reason the logout link is not working as it should. As it is a physical URL that is definitely functional I don’t really understand why. Where are the settings data stored? In particular the “After Logout Page”?
Could it be that there are some settings ‘remnants’ from the fact that I ‘cloned’ the second site from the first site and then just updated wp-config to use the right DB prefix? I did this because I wanted the same theme and plugins as a starting point. I have also modified certain aspects of the eMember plugin, only related to styles and text output in the eng.php file and nothing that could cause this. Also in case you have any doubts can I remind you that First site works perfectly well using the very same modified file.
ConradApril 1, 2012 at 5:09 am #43566
Can you please post a link to your 2nd WP install and a test member details so I can log in and observe the behavior. It might give me an idea of where the redirection is coming from.April 1, 2012 at 12:18 pm #43567April 2, 2012 at 12:22 am #43568
Looks like something is doing a redirection to the following URL:
Since it is inside the admin area, you need to be logged in as a user to be able to access it. eMember has already logged you out so WordPress is automatically redirecting to the login page or re-authentication.
I have sent you an email to get access to this so I can add some debugging and see what is going on.April 2, 2012 at 1:19 pm #43569
Turned out that the following WordPress function is not working out in this install of WordPress.
I have made a small tweak in eMember to use a different method to do the redirection. Let me know how it goes now. If it works good now then I will add this change to the core version of eMember.April 3, 2012 at 11:15 am #43570
Yes that seems to work perfectly now. Thanks very much for the help.
- You must be logged in to reply to this topic.