Links from sub folders
Forum rules
PLEASE READ THE FORUM RULES BEFORE YOU POST:
viewtopic.php?f=12&t=1901
MUST READ:
http://www.wysiwygwebbuilder.com/publish.html
http://www.wysiwygwebbuilder.com/preview.html
Frequently Asked Questions about Publishing
PLEASE READ THE FORUM RULES BEFORE YOU POST:
viewtopic.php?f=12&t=1901
MUST READ:
http://www.wysiwygwebbuilder.com/publish.html
http://www.wysiwygwebbuilder.com/preview.html
Frequently Asked Questions about Publishing
Links from sub folders
Create a sub folder in your project and reference an image from the root folder. It will show fine in the local preview, but after you upload it, it will not display the image as the image link contains a relative link i.e.
<img src="images/ics1.png" id="Image1" alt="" width="182" height="88">
where it should be:
<img src="/images/ics1.png" id="Image1" alt="" width="182" height="88">
or
<img src="../images/ics1.png" id="Image1" alt="" width="182" height="88">
I know you would like a sample project file, but I am in the middle of a big project and simply cannot get one done. Right now, I am simply editing the generated files on the server to fix them. It will do for now.
It has occurred to me this may not be a bug, but a limitation of the editor and I am not supposed to use sub-folders. If that is the case, then so be it.
<img src="images/ics1.png" id="Image1" alt="" width="182" height="88">
where it should be:
<img src="/images/ics1.png" id="Image1" alt="" width="182" height="88">
or
<img src="../images/ics1.png" id="Image1" alt="" width="182" height="88">
I know you would like a sample project file, but I am in the middle of a big project and simply cannot get one done. Right now, I am simply editing the generated files on the server to fix them. It will do for now.
It has occurred to me this may not be a bug, but a limitation of the editor and I am not supposed to use sub-folders. If that is the case, then so be it.
Re: Links from sub folders
Sub folders are supported, of course.
This functionality has always been working like this , so I do not think anything is wrong with it otherwise it would also not work for other users.
This is not correct because it indicates that the images are in the root of the website.
If you need further assistance then please share a DEMO project.
I do not need the complete project because that will only take more time to figure out what you have done.
Basically, I just need a small project with one page and object(s) that are relevant to your question.
For further details about how to share a project file, please see this FAQ:
viewtopic.php?f=10&t=82134
This functionality has always been working like this , so I do not think anything is wrong with it otherwise it would also not work for other users.
This is not correct because it indicates that the images are in the root of the website.
Code: Select all
<img src="/images/ics1.png" id="Image1" alt="" width="182" height="88">
I do not need the complete project because that will only take more time to figure out what you have done.
Basically, I just need a small project with one page and object(s) that are relevant to your question.
For further details about how to share a project file, please see this FAQ:
viewtopic.php?f=10&t=82134
- BaconFries
-
- Posts: 5871
- Joined: Thu Aug 16, 2007 7:32 pm
Re: Links from sub folders
If you are needing help then as Pablo has asked please provide a basic "Demo" project. It doesn't need to be anything fancy just what you are writing about ie a couple of images nothing more. This shouldn't take you more than a couple of minutes to do and it will get you an answer to what you want. After all you are taking time to manually make changes to the html to get what you think it should be so a simple "Demo" shouldn't take anymore of your time.
Re: Links from sub folders
Okay, I am going to do some more research. I am getting different results from two different servers.
By the way, the "images" folder is located in the DocumentRoot of the project. The page in question is being used as a replacement ErrorDocument page and is located in a subfolder off the DocumentRoot.
On one server, when I force the page error, the image is displayed but none of the CSS is being loaded.
On the other server, when I force the page error, the image is not being displayed, and neither is the CSS.
When I access the page directly, through a browser, the image is not shown, but the CSS is loaded and the rest of the page is displayed.
On the other server the browser displays the page(s) correctly.
One this is certain, there appears to be an inconsistency in the server configuration. I will look into this.
Sorry for jumping the gun. Too many long nights working on this project.
By the way, the "images" folder is located in the DocumentRoot of the project. The page in question is being used as a replacement ErrorDocument page and is located in a subfolder off the DocumentRoot.
On one server, when I force the page error, the image is displayed but none of the CSS is being loaded.
On the other server, when I force the page error, the image is not being displayed, and neither is the CSS.
When I access the page directly, through a browser, the image is not shown, but the CSS is loaded and the rest of the page is displayed.
On the other server the browser displays the page(s) correctly.
One this is certain, there appears to be an inconsistency in the server configuration. I will look into this.
Sorry for jumping the gun. Too many long nights working on this project.
Re: Links from sub folders
Are you using the ErrorDocument 404 option in the .htaccess file?
If so (and the rule has not been changed), then it must not use external css style sheets i.e. Tools > Options > HTML > CSS (first option) should be unticked.
If so (and the rule has not been changed), then it must not use external css style sheets i.e. Tools > Options > HTML > CSS (first option) should be unticked.
Re: Links from sub folders
No, I have set the ErrorDocument in a VirtualHost config file off the main config file. The server is a dedicated server I have full control over.
I did uncheck that option. Restarted the program, reloaded the project, removed the entire project source from the server, and published the entire project. It made no difference in the source code and everything still acts as before.
However, I did discover publishing does not create any needed folders and does not show any errors for that. I manually created the required folders, then re-published the project and here are the results, along with a demo project to demonstrate it.
-----
When accessing the page directly with the browser the access.log file shows:
GET /bob/errors/page1.html HTTP/1.1" 200 888 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:109.0) Gecko/20100101 Firefox/110.0
GET /bob/errors/image_test.css HTTP/1.1" 200 618 "http://xx.xx.xx.xx/bob/errors/page1.html" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:109.0) Gecko/20100101 Firefox/110.0
GET /bob/errors/images/ics1.png HTTP/1.1" 200 47346 "http://xx.xx.xx.xx/bob/errors/page1.html" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:109.0) Gecko/20100101 Firefox/110.0
All is good.
Now when Apache uses it as an ErrorDocument:
GET /goober HTTP/1.1" 404 1390 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:109.0) Gecko/20100101 Firefox/110.0
GET /image_test.css HTTP/1.1" 404 1390 "http://xx.xx.xx.xx/goober" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:109.0) Gecko/20100101 Firefox/110.0
GET /images/ics1.png HTTP/1.1" 200 47346 "http://xx.xx.xx.xx/goober" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:109.0) Gecko/20100101 Firefox/110.0
Note the paths used by Apache when trying to access the CSS and image files.
Here is the ErrorDocument setting:
ErrorDocument 404 /bob/errors/page1.html
Here is a link to the test/demo project file: https://docs.google.com/document/d/1jRD ... ue&sd=true
Re: Links from sub folders
I do not think the problem is related to the project.
I think it's more a server related issue. Maybe something is wrong with the permissions?
Did you enable the error log in the publish settings?
I think it's more a server related issue. Maybe something is wrong with the permissions?
Did you enable the error log in the publish settings?
Re: Links from sub folders
The log shows the image file was not transferred due to an SSH_FX_NO_SUCH_FILE error, when the "images" folder did not exist. After I created the folder, everything appears to go fine.
22/02/2023 11:36:22.883 *** START OF PUBLISH ***
22/02/2023 11:36:22.883 Scanning publish folder...
22/02/2023 11:36:22.883 Found 6 file(s).
22/02/2023 11:36:25.057 Removing temporary files...
22/02/2023 11:36:25.057 Successfully published!
It appears Apache is expecting a full path from DocumentRoot for all the files in the page in order for the Error Document to work correctly. I am assuming this as the logs suggest the paths are not being filled in my Apache, even though the Directory entry for the VirtualHost precedes the declaration for the ErrorDocument.
There does not appear to be any options to work around this in Apache, but I can manually code around it. It does not impact a lot of pages (5).
Now that I know the folders must be created before I publish, I will make sure to do so. Thank you.
Re: Links from sub folders
You should not have to create folder manually, I have never heard about other user having to do this.
Many users publish their website to a Apache server, including myself.
Are you sure this is not an issue of the server configuration?
Maybe the remote root folder is not correctly specified?
Many users publish their website to a Apache server, including myself.
Are you sure this is not an issue of the server configuration?
Maybe the remote root folder is not correctly specified?
Re: Links from sub folders
The files and folders are all owned by the same owner and group as me. I can SSH over and manipulate any file in that folder without resorting to using sudo. I also use SFTP to move files around for backup purposes. Never have had a problem.
The log does not show any attempts to create a folder. It does show the error when the folder does not exist.
If the DocumentRoot folder was not correct then Apache would have a problem displaying anything. Nothing in the server logs shows anything unusual surrounding the SFTP transfers.
The log does not show any attempts to create a folder. It does show the error when the folder does not exist.
If the DocumentRoot folder was not correct then Apache would have a problem displaying anything. Nothing in the server logs shows anything unusual surrounding the SFTP transfers.
Re: Links from sub folders
I think the only way I can help you with this, is if you give me access to the FTP server, so I can check if there are any low level errors in the communication.
Re: Links from sub folders
I am going to crank up the logging levels and do some testing today. Let me exhaust that first. I have been setting up and running servers for over 30 years and this issue is a new one.
Re: Links from sub folders
Here is what I am seeing in the SFTP logs (just a small sample to show the issue) when I publish. By the way, the local Web Builder log does not show any errors.
Feb 23 15:55:47 server sftp-server[90763]: close "/usr/local/apache/htdocs/ftm_login.css" bytes read 0 written 7882
Feb 23 15:55:47 server sftp-server[90763]: open "/usr/local/apache/htdocs/ftm_login.php" flags WRITE,CREATE,TRUNCATE mode 0666
Feb 23 15:55:47 server sftp-server[90763]: close "/usr/local/apache/htdocs/ftm_login.php" bytes read 0 written 8367
Feb 23 15:55:47 server sftp-server[90763]: open "/usr/local/apache/htdocs/xxx_Catalog_1-1-19.pdf" flags WRITE,CREATE,TRUNCATE mode 0666
Feb 23 15:55:49 server sftp-server[90763]: close "/usr/local/apache/htdocs/xxx_Catalog_1-1-19.pdf" bytes read 0 written 1420099
Feb 23 15:55:49 server sftp-server[90763]: mkdir name "usr/local/apache/htdocs/images" mode 0777
Feb 23 15:55:49 server sftp-server[90763]: sent status Failure
Note, when the mkdir command is being issued, it is using a relative path, rather than the path set in the project. My first thought was the server could be dropping the root "/". So I used another SFTP client and created a directory:
Feb 23 15:57:57 server sftp-server[90543]: mkdir name "/usr/local/apache/htdocs/test" mode 0777
That command succeeded. However, I do not know how the exact command was issued by the client. It may have issued "mkdir test" as I had changed directory to /usr/local/apache/htdocs before issuing the command and when the server logged it, it included the full path.
If you still feel like you need access to test with, I will setup a login for you.
Feb 23 15:55:47 server sftp-server[90763]: close "/usr/local/apache/htdocs/ftm_login.css" bytes read 0 written 7882
Feb 23 15:55:47 server sftp-server[90763]: open "/usr/local/apache/htdocs/ftm_login.php" flags WRITE,CREATE,TRUNCATE mode 0666
Feb 23 15:55:47 server sftp-server[90763]: close "/usr/local/apache/htdocs/ftm_login.php" bytes read 0 written 8367
Feb 23 15:55:47 server sftp-server[90763]: open "/usr/local/apache/htdocs/xxx_Catalog_1-1-19.pdf" flags WRITE,CREATE,TRUNCATE mode 0666
Feb 23 15:55:49 server sftp-server[90763]: close "/usr/local/apache/htdocs/xxx_Catalog_1-1-19.pdf" bytes read 0 written 1420099
Feb 23 15:55:49 server sftp-server[90763]: mkdir name "usr/local/apache/htdocs/images" mode 0777
Feb 23 15:55:49 server sftp-server[90763]: sent status Failure
Note, when the mkdir command is being issued, it is using a relative path, rather than the path set in the project. My first thought was the server could be dropping the root "/". So I used another SFTP client and created a directory:
Feb 23 15:57:57 server sftp-server[90543]: mkdir name "/usr/local/apache/htdocs/test" mode 0777
That command succeeded. However, I do not know how the exact command was issued by the client. It may have issued "mkdir test" as I had changed directory to /usr/local/apache/htdocs before issuing the command and when the server logged it, it included the full path.
If you still feel like you need access to test with, I will setup a login for you.
Re: Links from sub folders
I think the only way I can investigate this is by having access to the server, so I can monitor the protocol myself.
Re: Links from sub folders
How do I get private information to you? I have a user setup and have changed the user/group of the Apache server to you as well.
Forgot to mention. The SSH/SFTP client I use is MobaXterm. Really nice product. I will have to stay off the production server until you are done, but I have an internal server I can use to continue to work.
Forgot to mention. The SSH/SFTP client I use is MobaXterm. Really nice product. I will have to stay off the production server until you are done, but I have an internal server I can use to continue to work.
Re: Links from sub folders
You can send the login details to info@pablosoftwaresolutions.com
I will look at it tomorrow.
I will look at it tomorrow.
Re: Links from sub folders
Sent.Pablo wrote: ↑Thu Feb 23, 2023 6:17 pm You can send the login details to info@pablosoftwaresolutions.com
I will look at it tomorrow.
Re: Links from sub folders
Thanks, I will take a look at it tomorrow.
Re: Links from sub folders
I did some tests, but I could not reproduce the problem.
Everything seems to work correct for me. All folders are created automatically, as expected.
Maybe you have already fixed it on your side?
If not, then what are the exact steps to make it not work?
Everything seems to work correct for me. All folders are created automatically, as expected.
Maybe you have already fixed it on your side?
If not, then what are the exact steps to make it not work?
Re: Links from sub folders
Well, I do dislike random computer problems. It is still broken for me. I'll bundle up the entire project and local files used. I'll email that link to you.
Re: Links from sub folders
I doubt that this is random. As a developer, I do not believe in 'random'. In my opinion, the same settings always result in the same behavior.
I loaded your project and published it without any modifications. Everything seems to work correct.
Maybe your firewall interferes with the communication?
I assume you are using the latest version of the software (18.1)?
I loaded your project and published it without any modifications. Everything seems to work correct.
Maybe your firewall interferes with the communication?
I assume you are using the latest version of the software (18.1)?
Re: Links from sub folders
Your connection went through the same firewall as mine.Pablo wrote: ↑Fri Feb 24, 2023 3:19 pm I doubt that this is random. As a developer, I do not believe in 'random'. In my opinion, the same settings always result in the same behavior.
I loaded your project and published it without any modifications. Everything seems to work correct.
Maybe your firewall interferes with the communication?
I assume you are using the latest version of the software (18.1)?
Well, I do not know what to tell you. Yes, version 18.1 and it still fails directory creation. I cannot fathom what would be different between your connection and mine. I'll just deal with creating the directories manually. Sorry to have wasted your time and thank you for trying.
Re: Links from sub folders
I was referring to your local firewall where WWB is installed.
Do you see a difference in the SFTP log between your session and my session?
I really did not do anything special, it just worked for me.
Do you see a difference in the SFTP log between your session and my session?
I really did not do anything special, it just worked for me.
Re: Links from sub folders
My local firewall only blocks async inbound connections.
The logs for you and me are very different. Mine show full paths and yours show relative paths. Is there a setting in WWB that would impact that?
Maybe I should just remove everything and start over. Before that I am going to try from another location and see what happens.
Re: Links from sub folders
It gets stranger. I am at a different location and still get the same results.
Feb 24 20:28:56 server sftp-server[102559]: mkdir name "usr/local/apache/htdocs/errors/images" mode 0777
Feb 24 20:28:56 server sftp-server[102559]: sent status Failure
For some reason, all my transfers are showing a full path for the mkdir command where yours were only showing relative paths. The full path would work, but the root folder is being stripped which makes it relative which is why it fails.
Now here is what is happening before any files were transferred.
Feb 24 20:28:55 server sftp-server[102559]: mkdir name "usr" mode 0777
Feb 24 20:28:55 server sftp-server[102559]: sent status Failure
Feb 24 20:28:55 server sftp-server[102559]: mkdir name "usr/local" mode 0777
Feb 24 20:28:55 server sftp-server[102559]: sent status Failure
Feb 24 20:28:55 server sftp-server[102559]: mkdir name "usr/local/apache" mode 0777
Feb 24 20:28:55 server sftp-server[102559]: sent status Failure
Feb 24 20:28:55 server sftp-server[102559]: mkdir name "usr/local/apache/htdocs" mode 0777
Feb 24 20:28:55 server sftp-server[102559]: sent status Failure
Why that is being done using a relative path is odd, but even more odd, why is it failing?
There is an inconsistent behavior between the sessions you did and what I did. Your sessions contain only relative paths, for everything, but my sessions all have full paths for everything. I have no idea how or why that would be different. There is no firewall which could know the full path and stick into the data stream. I am really at a loss on this.
Feb 24 20:28:56 server sftp-server[102559]: mkdir name "usr/local/apache/htdocs/errors/images" mode 0777
Feb 24 20:28:56 server sftp-server[102559]: sent status Failure
For some reason, all my transfers are showing a full path for the mkdir command where yours were only showing relative paths. The full path would work, but the root folder is being stripped which makes it relative which is why it fails.
Now here is what is happening before any files were transferred.
Feb 24 20:28:55 server sftp-server[102559]: mkdir name "usr" mode 0777
Feb 24 20:28:55 server sftp-server[102559]: sent status Failure
Feb 24 20:28:55 server sftp-server[102559]: mkdir name "usr/local" mode 0777
Feb 24 20:28:55 server sftp-server[102559]: sent status Failure
Feb 24 20:28:55 server sftp-server[102559]: mkdir name "usr/local/apache" mode 0777
Feb 24 20:28:55 server sftp-server[102559]: sent status Failure
Feb 24 20:28:55 server sftp-server[102559]: mkdir name "usr/local/apache/htdocs" mode 0777
Feb 24 20:28:55 server sftp-server[102559]: sent status Failure
Why that is being done using a relative path is odd, but even more odd, why is it failing?
There is an inconsistent behavior between the sessions you did and what I did. Your sessions contain only relative paths, for everything, but my sessions all have full paths for everything. I have no idea how or why that would be different. There is no firewall which could know the full path and stick into the data stream. I am really at a loss on this.
Re: Links from sub folders
All I can say is is that it works for me, with the settings you gave me.
I can only 'fix' something if it does not work for me too. It would be a huge risk to change this functionality if it has been working without any issues for years for other users.
I can only 'fix' something if it does not work for me too. It would be a huge risk to change this functionality if it has been working without any issues for years for other users.
Re: Links from sub folders
Oh, I know that. I am not really expecting a fix, per se. I really got curious as to what the heck I could be doing to cause such a problem. I had run out of things to try.
The second computer is actually sitting next to the server. I figure I could not get a cleaner connection than that.
I am going to try and start over. Remove everything and reload the application and start a new page. That is the only thing I have not done yet.
Again, thank you for your time. I wish it had been more fruitful.