Author Topic: Loginbox takes me into backend?  (Read 3817 times)

Offline Roych

  • Betatester
  • **
  • Posts: 573
  • Gender: Male
Loginbox takes me into backend?
« on: December 16, 2015, 08:12:31 PM »
Hello, I don't know what am I doing wrong, as I made many sites with this with no problem, but the Droplet Loginbox just takes me into backend and doesn't show me the login form.
I have login enabled in settings and everything looks fine.
I have created an ADMIN page (private) with wysiwyg with loginbox droplet. But when I try to go to it just redirects me to backend. Am I forgetting something here. Even if I try to preview from backend.


Thank you


R

Offline Ruud

  • Posts: 3649
  • Gender: Male
  • Do not use PM for help! Please use the forum!
    • Dev4Me - Professional WebsiteBaker Development
Re: Loginbox takes me into backend?
« Reply #1 on: December 16, 2015, 11:00:37 PM »
If you called this page "admin" and use shorturl...

Admin (and other directories like media/framework/languages/modules/etc..) are reserved names by the system. If it would show your frontend /admin/ page it would mean you could never access the backend anymore.

Offline Roych

  • Betatester
  • **
  • Posts: 573
  • Gender: Male
Re: Loginbox takes me into backend?
« Reply #2 on: December 17, 2015, 01:47:10 PM »
If you called this page "admin" and use shorturl...

Admin (and other directories like media/framework/languages/modules/etc..) are reserved names by the system. If it would show your frontend /admin/ page it would mean you could never access the backend anymore.


You are right changing the name of the page worked. But I have some other sites (multilanguage) with ADMIN name and they work.


Thank you


R

Offline Ruud

  • Posts: 3649
  • Gender: Male
  • Do not use PM for help! Please use the forum!
    • Dev4Me - Professional WebsiteBaker Development
Re: Loginbox takes me into backend?
« Reply #3 on: December 17, 2015, 01:50:05 PM »
But I have some other sites (multilanguage) with ADMIN name and they work.

My guess would be that those site do not have shorturl installed.

Offline Roych

  • Betatester
  • **
  • Posts: 573
  • Gender: Male
Re: Loginbox takes me into backend?
« Reply #4 on: December 17, 2015, 02:06:34 PM »
But I have some other sites (multilanguage) with ADMIN name and they work.

My guess would be that those site do not have shorturl installed.


They do: you can see it here: http://www.bi-center.eu/account/login.php?redirect=http://www.bi-center.eu/pages/si/admin.php it is a direct link to login form.


R

Offline Ruud

  • Posts: 3649
  • Gender: Male
  • Do not use PM for help! Please use the forum!
    • Dev4Me - Professional WebsiteBaker Development
Re: Loginbox takes me into backend?
« Reply #5 on: December 17, 2015, 02:11:56 PM »
That page is called (in shorturl notation) /si/admin/ and will work fine.
Only /admin/ is not valid (existing directory of a WB installation)

Offline Roych

  • Betatester
  • **
  • Posts: 573
  • Gender: Male
Re: Loginbox takes me into backend?
« Reply #6 on: December 17, 2015, 04:01:31 PM »
That page is called (in shorturl notation) /si/admin/ and will work fine.
Only /admin/ is not valid (existing directory of a WB installation)


Oh, I see. good to know, thank you for clearing that out for me. ;)


R

Offline sky writer

  • Posts: 926
Re: Loginbox takes me into backend?
« Reply #7 on: December 17, 2015, 09:19:36 PM »
This brings up an interesting conundrum (a confusing and difficult problem) for me.

I used to always change my WB pages directory to the root (from /pages - to -  / )  And everyone warned me (rightfully so) that this could cause problems if people created a page with the same name as a WB system directory.  But I (and more importantly, my clients) didn't like have the "/pages/" in the website URL's, so I continued.  Luckily I have never had any issues to date.

But then I discovered the shorturl module, and was relieved that I could now leave the pages directly as "/pages" and let the module hide it.  I had no idea that doing so puts me right back to square one, where no system directly could be used as a page name.  Am I understanding this correctly?

Don't get me wrong, I appreciate the module and the work that went into it, the reason I am asking is that I've been told that shorturl has been the cause of some problems I've had trying to get a website to function properly in WB Portable with frontend login functionality.  I am thinking, if I had just changed my pages directly to the root like I used to, I would not have had these problems.

I would love if anyone could shed some light on this for me.

Offline Ruud

  • Posts: 3649
  • Gender: Male
  • Do not use PM for help! Please use the forum!
    • Dev4Me - Professional WebsiteBaker Development
Re: Loginbox takes me into backend?
« Reply #8 on: December 17, 2015, 11:09:24 PM »
If you would have create an page called "admin" without shorturl and with the pages removed you would be in more trouble..

"admin" is a system folder used by WB. A url like "www.yoursite.com/admin/" should open the backend always. The website cannot decide if you want to look at a frontend page called admin or a backend page with the same name.

It is possible to change the /admin/ directory to something else by renaming the directory and creating the ADMIN_URL and ADMIN_PATH constants in the config.php (like in <= WB2.8.2), but the same problem for other system directories will always stay.

Using shorturl, the admin page is created as /pages/admin.php. With /pages removed it would have been written as /admin.php.
Creating a childpage in this admin.php would create a new /admin/ folder, overwriting the backend files.
Removing or renaming this would remove the backend completely.
That is the main reason to "NEVER" remove the /pages/ completely in the settings.

I am thinking, if I had just changed my pages directly to the root like I used to, I would not have had these problems.
If you did that, you would have had no backend at all anymore.

Offline sky writer

  • Posts: 926
Re: Loginbox takes me into backend?
« Reply #9 on: December 18, 2015, 12:45:08 AM »
I hope you don't think I was painting shorturl in a bad ligth... I appreciate what shorturl does, and all of your work.  I plan to continue using shorturl.

I was just surprised to read this thread.  The thing is, with all the websites which I created with the pages directory set to /, if I try to create a page named "admin", I get this warning "A page with the same or similar title exists" and the page is not created.  So, I don't see the danger... only the possibility of an inconvenience, if a client NEEDED a page named "admin".

Am I missing something?

Offline Ruud

  • Posts: 3649
  • Gender: Male
  • Do not use PM for help! Please use the forum!
    • Dev4Me - Professional WebsiteBaker Development
Re: Loginbox takes me into backend?
« Reply #10 on: December 18, 2015, 10:15:11 AM »
If the client needed a page called "admin" you still can use the trick in renaming the backend admin folder top something else.
That will work fine.
The same goes if the client needs a page called "media". You can rename that one too. (some modules might give problems though).

If your client wants a page called framework, account, include, templates, etc.. you would be in real trouble. Both shorturl and the remove-pages-trick will not work. This is caused by the structure of WB, designed around using the /pages/ (or any configured other) folder for content.

Offline sky writer

  • Posts: 926
Re: Loginbox takes me into backend?
« Reply #11 on: December 18, 2015, 04:15:02 PM »
My point is,
  • whether you use the "remove-pages-trick" or shorturl, you should not create pages using the names of system directories.  And with both approaches, for certain system directories, you can rename them to allow for a frontend page with that name, for instance "admin".
  • with the "remove-pages-trick" you are not able to add a page with the same name as a system directory, as you receive the warning I mentioned.  For me, this is a safety net.  With shorturl, you are able to create a page using a system directory name (and name), but then you can not access that page on the frontend (given the explanation you provided).  I would think this might cause confusion for an end user.
So, my question is...
what is the benefit of shorturl, over the "remove-pages-trick"?  Or, what problems could/does the "remove-pages-trick" cause which shorturl remedies?

And finally, and I am talking as a complete novice, if it isn't already clearly apparent, but is there a reason that a non-used-word folder /wbxxxyz could not be used for all backend content, freeing ALL possibilities for frontend page naming, without the need for a /pages/ directory?  I know there must be very good reasons, I am just curious.

Offline Ruud

  • Posts: 3649
  • Gender: Male
  • Do not use PM for help! Please use the forum!
    • Dev4Me - Professional WebsiteBaker Development
Re: Loginbox takes me into backend?
« Reply #12 on: December 18, 2015, 04:47:24 PM »
Well actually there is no benefit at all. Removing /pages and .php is just cosmetic, no matter what method used.
The way it is done is just what you like best (just like driving to work).

Putting all system stuff in a folder (randomly named) could be done, but that should have been done at WB 0.0.1.
Now, many parts of the CMS and modules rely on the structure as it is now.
Personally I don't think I want my client to tell to go to www.theirwebsite.co m/wbxxxyz/admin ;)

Offline sky writer

  • Posts: 926
Re: Loginbox takes me into backend?
« Reply #13 on: December 19, 2015, 05:28:36 AM »
Fair enough.  Thanks for entertaining my question.  All the best to you.