WebsiteBaker Support (2.8.x) > Bakery Shop
Cannot change name of bakery folder
mjm4842:
Glad it worked for you Argos.
Note that renaming the bakery folder is only esthetic for the site administrator since it's address never actually appears in the URL for the end user, at least it doesn't for me. Can you tell me at which point it does show up in the URL?
Renaming everything else is only useful if you want to have multiple independant copies of bakery instealled.
Unfortunately there is no easy way to just rename the folder.
With best regards,
Michael
instantflorian:
Hi Michael,
the bakery path is displayed when openig a bakery product detail page (see 1st attachment).
But I wonder why the easy way of changing the bakery path did not work, because the way I described in my earlier post worked for me (see 2nd screenshot, which shows an url where I changed the path from "bakery" to "portfolio").
BR
-instantflorian
[gelöscht durch Administrator]
mjm4842:
Hi instantflorian,
It didn't work because there are hard coded references to the bakery folder in the source code and possibly in the database too. Once the module is installed, it gets really complicated to find all of the right spots. That's why it's better to make the changes before you install it.
Doing a search and replace for the uppercase of "BAKERY" is probably not necessary. Based on my quick scan, it seems to only be used for $MOD_BAKERY variables but I could be wrong.
The mixed case "Bakery" is typically only used to refer to the name of the Bakery module itself. Again, you can probably get away with not changing this except in the "info.php" file where you must if you want to specify a separate installation of Bakery if you are going to change the database prefix and run multiple copies of Bakery. This affects the name of the page type when you are creating a new page.
Where it gets more complicated is when it comes to the lowercase "bakery". Unfortunately this string is used in many situations including but not necessarily limited to the folder name and the database table prefixes.
For example, I just did a search for "modules/bakery" throughout all of the files and found that 63 of the bakery module files included that specific string alone. The folder name also appears in "info.php". If I search for just lowercase "bakery", it shows up in 135 files which obviously includes those found in the modules/bakery search above.
It would be nice to replace all this with one variable in the info.php file and be able to easily modify it in just one place. This would make it easier to change the folder name.
While we are at it, it would also be nice to have a variable for the database table prefix. This would allow us to have more than one instances of the bakery module installed at a time.
Keep in mind that I spent a total of about 5 minutes doing this research so I may have missed a few things along the way. If you use this information, your mileage may vary. If you do try your hand at it, let us know what worked, what didn't for you.
As usual, take what makes sense to you and forget the rest.
With best regards,
Michael
mikal42:
Thanks for posting up that info mjm4842.
The funny thing is that I had concluded that this is the only way it would work and had done this!!
I then find your post and it confirmed it, it definitely needs to be sorted as this is THE major obstacle in the module.
I was on the verge of using a different CMS until I tried this as my client was really unhappy about the word bakery being in the url for her skincare products, and quite rightly so...
mjm4842:
See https://forum.WebsiteBaker.org/index.php/topic,18426.msg133522.html#msg133522
With best regards,
Michael Milette
Navigation
[0] Message Index
[*] Previous page
Go to full version