WebsiteBaker Community Forum

General Community => Global WebsiteBaker 2.8.x discussion => Topic started by: SaBRENT on March 18, 2008, 01:08:18 AM

Title: watch what you remove!!
Post by: SaBRENT on March 18, 2008, 01:08:18 AM
Well after a few hours of working, then deciding to remove a page that I really didn't want. The system removed a folder I really did want.

Example of what happened:
home/ (WB root)
home/page1.php -(created in WB)
home/page1/ -(created in FTP)
home/page1/* -(created non-WB info)
home/page1.php -(removing/removed by WB)
home/page1/ -(also removed by WB)
home/page1/* -(also removed by WB)

My suggestion, a huge warning upon removal or a better check system to see if a subdirectory was created within WB or not. I love WB even though my simi-stupidity caused me to rework everything I just did.
Title: Re: watch what you remove!!
Post by: Eki on March 18, 2008, 07:48:01 AM
To me it sounds logical: page1 is the folder for the rest. Removing the folder, will also remove the contents of that folder. Didn't you see the warning pop up?

Title: Re: watch what you remove!!
Post by: mickpage on March 18, 2008, 10:34:09 AM
I think Eki has missed the point. SaBRENT didn't remove the folder, WB removed it automatically when SaBRENT deleted the page1.php page using WB admin.
This is because when you create child-pages, these child-pages are placed in a new WB-created folder which is given the name of the parent page. So WB assumed (incorrectly) that the "page1" folder was there because of child-pages underneath page1.php, whereas SaBRENT had actaully created it himself (presumably through FTP).
So - people need to be aware NOT TO CREATE folders with the same names as WB pages, or else they will be deleted if you remove the WB page.
Title: Re: watch what you remove!!
Post by: Eki on March 18, 2008, 11:56:31 AM

I understand...did the same quickly in a test-environment and this indeed is the case. So is there a way to prevent this, apart from taking care that the folder may not have the same name as WB pages? In other words...should this be considered as something that needs to be taken care of in the future?

Title: Re: watch what you remove!!
Post by: ruebenwurzel on March 18, 2008, 01:05:21 PM

if you create pages via WB backend, only folders will be created if you create subpages. And if you delete this subpages the folder also needs to be deleted. This is correct and the way WB works.

If a user like SaBRENT creates folders manually with ftp in the pages directory is this a thing wich is out of WB System. This makes no sense for WB, as WB creates his folders itself if there is one needed. So it is only the users part (if he really wants this folders) to look that there is no page with the same name. This never could be a part of WB. Cause the system could not no (no system could this know) if this folder is created manually of from the system.

Title: Re: watch what you remove!!
Post by: Eki on March 18, 2008, 02:32:26 PM
Hello Matthias,

I understand, but in this case the page1.php was NOT created in the subfolder page1. So actually it does not have a parent at all, or may have a different parent (other wb-folder-name). But when deleting this page, the ftp-folder with the same name was also deleted whereas it wasn't part of the page_trail.


Title: Re: watch what you remove!!
Post by: SaBRENT on March 19, 2008, 03:59:09 AM
I would be understanding to the folder removal if it was the case that i had created-or-had been using the folder within WB by creating-or-using subpages, but I had not done this. A check system should be simple, check if the page has a subpage below it then remove the folder otherwise don't remove anything other than the page requested.

I know the chance is small of this happing for the wide usage of WB but in my case I had a WB page (with no subpages) named the same as a (non-WB) folder I had made after the creation of the WB page. The folder was made outside of WB, the folder was being used as a sub domain for my site (without the use of WB).

In any case, I am not complaining nor asking for a fix (though it might save someone time & data). All in all I guess I don't make posts understandable, as I got misinterpreted last time when i talked about an idea for a better mysql error reporting -and- site-wide maintenance mode (which I still think both would be a small plus for WB).
Title: Re: watch what you remove!!
Post by: Eki on March 19, 2008, 09:12:51 AM
Hello @SaBRENT,

Please don't bother too much about making understandable posts or not. We are here to ask more questions if it is needed. Please keep in mind that your feedback to the community is highly appreciated. Keep up the good work!!!