Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

General Questions /

General questions about getting started with SilverStripe that don't fit in any of the categories above.

Moderators: martimiz, Sean, biapar, Willr, Ingo, swaiba, simon_w

[SOLVED] Root.Content.Photos tab 'forgets' contents after Search for new Files


Reply


3 Posts   489 Views

Avatar
esakrielaart

Community Member, 58 Posts

18 August 2011 at 2:13am

Hello,

a very strange problem occured to me this morning. I have a simple site, which is extended in the CMS with a tab called 'Photos'. Here I can select new photo's that should be connected to the current page (the template will load them at a specific point).
Now this all works fine, untill you go to the 'Files & Photos' main tab and click 'Search for new files'.
When doing that and then returning to the page where I just added the photos, none of them is shown in the selectionform (both selected and non-selected). In the database, the table connecting files with pages is just as before, just fine.

Is this a known issue, with a solution? Any help would be highly appreceated.

Friendly regards,
Maurice

Avatar
esakrielaart

Community Member, 58 Posts

18 August 2011 at 3:05am

Update:

I notice that after uploading a new photo using the photo's tab I created for the Page, two lines appear in the File table inside mySQL database. One containing all file info, the other more some kind of reference with filenames like new-articlephoto. The last one gets (of course) deleted when searching new files. So the problem would be solved if the button 'Search for new files' would not delete non-excisting files. Question: how to?

Thanks!
Maurice

Avatar
esakrielaart

Community Member, 58 Posts

18 August 2011 at 3:09am

Solved, I had to change the extension of a class to DataObject instead of Image. This solved the problem.