silexlabs / Silex

Silex is an online tool for visually creating static sites with dynamic data. With the free/libre spirit of internet, together.
https://www.silex.me
GNU Affero General Public License v3.0
2.32k stars 585 forks source link

Single Site Mode - URLs #1170

Closed bhandarys closed 2 years ago

bhandarys commented 2 years ago

Hi, Does the URL for assets change in Single Site Mode? In Multi site mode all assets (images) were loaded in the template without any error. But in Single site mode, I get HTTP 404 error. One example is provided below

http://localhost:6805/ce/custom-service/get/src/libs/templates/silex-templates/air/assets/book-5.png [[HTTP/1.1 404 Not Found 1751ms]]()

However this works fine on Multi Site mode. Kindly help.

My versions are: Node: 14.16.1 "silex-website-builder": "^2.7.29", OS: Windows 10 Browser: Chrome (version 98.0.4758.102)

lexoyo commented 2 years ago

what is the path of the website, as shown in the network?

bhandarys commented 2 years ago

Thanks Alex for the prompt response. The path of the website is

http://localhost:6805/?path=/src/techntour/websites/user1/editable.html&service=custom-service (It's on my local machine)

lexoyo commented 2 years ago

I will, eventually

I have reported your messages

Have a good day

lexoyo commented 2 years ago

Thanks Alex for the prompt response. The path of the website is

http://localhost:6805/?path=/src/techntour/websites/user1/editable.html&service=custom-service (It's on my local machine)

So the path of the assets is wrong. Please do this :

  1. In multi site mode, start from a template, save the template in your new service
  2. In single site mode open this new website
bhandarys commented 2 years ago

I completely missed this point. In multi site mode, when I saved the site for 3 users, user1, user2 and user3, only editable.html and editable,json was saved in the respective directory. Assets, CSS and JS folders were missing. I used Save Website / Custom Service and clicked OK on the top right where the suggested name was editable.html. Should I be doing something more to save the other folders and files? Of course, I plan to delete all files and redo it again. Kindly suggest

lexoyo commented 2 years ago

If you start from a template and do what you said it should be ok

Please try again to be sure

bhandarys commented 2 years ago

Hi Alex, I did as you suggested. In multi site mode, saving the templates to the user only seems to be saving editable.html & editable.json file without the folders. Not sure if I am doing anything wrong.

I have now copied the template folder from templates to my user directory from my angular app. It's working fine now. However I getting some errors with certain built in templates. Will test it again and raise a issue when i can consistently reproduce it.

lexoyo commented 2 years ago

Hi Alex, I did as you suggested. In multi site mode, saving the templates to the user only seems to be saving editable.html & editable.json file without the folders. Not sure if I am doing anything wrong.

This is normal

I have now copied the template folder from templates to my user directory from my angular app. It's working fine now. However I getting some errors with certain built in templates. Will test it again and raise a issue when i can consistently reproduce it.

ok