Don't miss out Virtual Happy Hour today (April 26).

Try our conversational search powered by Generative AI!

Add image to Page Folder on a new page

Vote:
 
I'm using EPiServer 4.61 for sevaral sites and have noticed the following behaviour: 1. In Edit mode, create a new page (of any type that has an xhtml property). Do not save it yet. 2. In the xhtml property, select Insert Image. 3. In the resulting 'Select Image -- Web Page dialog' dialog, click on 'Page files' in the Starting Points panel. 4. The message 'A folder for this page has not been created, do you wish to create one now?' appears. 5. Click the 'Yes' button, and a folder is created with a seemingly random ID in its path (/upload/xxx), but with the name and ID of the home page at the top of the panel. 6. Select an image and press Insert to save the image in this folder, and Save & Publish the page 7. In the same page, repeat steps 2 and 3. 8. The 'A folder for this page has not been created...' message appears again. 9. Clicking 'Yes' now creates another folder with a different path (/upload/yyy), but with the name and ID of the new page at the top of the panel. 10. Finally, create another new page as in 1, then repeat steps 2 and 3 as before. 11. This time you are not told that 'A folder for this page has not been created...' - instead you are directed to the folder created in 5. I think this means that every time someone adds an image (or any other file) to a page that hasn't been saved yet, then after the first time they are prompted to create a folder, every subsequent addition of a file to any new (unsaved) page will add the file to the same folder. In addition, subsequent file additions after a page has been saved will create a new folder for the page, meaning that files for the page are held in more than one folder. I was under the impression that a page folder had the same name as the page's ID, but there's obviously an extra level of indirection here. Most sites we create use images multiple times, so have dedicated folders for images, but we are now working on a site where the pages are 'self-contained', more like magazine pages, where it would be tidier if all the content lived in one logical unit (the EPiServer page and the page folder). So, is there an explanation for the behaviour above? I think it's probably a bug in that each page should have it's own dedicated page folder, but is there any issue with the folder ID's differing from those of the page? TIA, Mark
#17647
May 23, 2007 19:36
Vote:
 
Yes, this is a bug (id 44016). No fix for it yet, unfortunately. The page id and private folder id is not in sync. For historical reasons - I've been told. And yes, one could wish that they were, but I guess this is one we'll have to live with. /Steve
#18484
May 23, 2007 22:16
Vote:
 
And the historical reason is simply that the PageID was assigned through an identity field in the database, so it didnt exist before the pagedata was written to tblPage the first time. In order to be able to upload images/documents for pages not yet saved, another mechanism for assigining pagefolderid's had to be invented. Best regards, Johan Olofsson EPiServer AB
#18485
May 24, 2007 9:17
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.