![]() |
Add existing file error
I have just installed the latest Sigil version 1.3.0. Whenever I try to add a particular .xhtml file nothing happens. On a second attempt I get a message saying that the file already exists in the book even though the window shows only the default code. Any ideas? Ultimately, I just had to copy and paste the file in the window and no errors were at any stage detected.
|
Try renaming it. Maybe it's because it's the same name as existing file.
|
Thanks, but no, it doesn't want to load, even renamed. Other .xhtml files that I've loaded in the past (presumably successfully) are returning coding errors, but this one file won't load at all.
|
Okay, I got it to load as an html file rather than a xhtml extension. I'm really a bit confused about the difference to be honest. But presumably it is fine to create epubs from html files anyway?
|
No, epub needs xhtml but you can modify html to work.
That said, I could not follow what problem you are reporting. Which Window shows only the default code? Re youtalking the BookBrowser or some other Window. My guess is you are using a non-standard layout and the file was loaded, just not where you expected it to be. |
Hello, Kevin, I was talking about the main window that shows the code for the book. When you say you can modify html to work, what exactly do you mean? What I have done historically is to create an html file, wrap it in the basic xhtml doctype and tags -
<?xml version="1.0" encoding="utf-8"?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <title></title> </head> <body> <p>my html here</p> </body> </html> - save it as an xhtml file extension and then add it as an existing file in Sigil. Am I doing something fundamentally wrong this way? |
PS I have just had my file validated on WC3 and yet it will not appear in Sigil by adding it as an existing file. Very odd.
|
Are you saying it does not Appear in the BookBrowser window at all?
|
I don't know why you're having a problem but what I do, which should sidestep it, is in Sigil's Book Browser right click and select Add Blank HTML File. Then replace the <p>(space entity)</p> line with everything between the two body tags in the file you're adding, copying the text from notepad or whatever. Ctl-C everything between the body tags in the original file, then in Sigil Ctl-V after selecting that <p>(space entity)</p> line (click on its line number). That ensures that you get a well formed html file up to the body tag.
|
No, doesn't show up at all for whatever reason
|
Yes, that is how I got around it too, but I'm still puzzled as to why it can't be added as an existing file. I didn't have this problem in previous versions and not being able to easily toggle between the code and book views is a bit of a backward step.
|
What is the exact name of the existing file you are trying to add? Can you show us a screenshot of the Book Browser window before you try to add the existing file (named above).
|
Okay, thanks to your questions I did a bit of further testing and after several trials I discovered that the file would import under a different name, as JSWolf initially suggested. I have no idea what the glitch was with the original file, but there you go. Thank you for helping out with this.
|
There is no such thing as a glitch. As DiapDealer said we need to know the exact name of the file you tried to add that gave you trouble. And a screenshot of the BookBrowser Window both before and after.
|
Kevin, first, I haven't used Sigil in quite a while so hadn't realised that an added file wouldn't automatically open in the code window. The name of the wayward file is whats-the-best.xhtml. However, when I pasted the body contents into a new document with the xhtml doctype and tags and saved it as test.xhtml the file imported without a problem. I've been unable to figure out how to upload images from my PC for this reply, but I assure you that the before and after images are identical and the file does not appear in the Book Browser file directory under Section0001.xhtml. But when I attempt to add the file again I get the message "Unable to load 'whats-the-best.xhtml' A file with this name already exists in the book". At least I know now how to proceed if the issue happens again. Many thanks.
|
| All times are GMT -4. The time now is 10:52 PM. |
Powered by: vBulletin
Copyright ©2000 - 3.8.5, Jelsoft Enterprises Ltd.
MobileRead.com is a privately owned, operated and funded community.