Self-Evident / OneFileCMS

A single file cms - all in one file!
http://onefilecms.com/
165 stars 57 forks source link

files do not show #33

Closed neazoi closed 8 years ago

neazoi commented 10 years ago

when I try to see the list of files no files are shown. then, if I click once on the "folders first", the files are shown ok.

cwaldau commented 10 years ago

I was having the same problem and your comment helped me figure out a solution. It is a bit of a hack but seems to work.

Since files do seem to appear after clicking "folders first" or any of the other headers (for sorting) I simply added a

window.onload = function () {Sort_and_Show(1);}

to the <head> tag inside of onefilecms.php at about line 4481.

It basically simulates the click (that you would otherwise be doing manually) to get the files to appear.

Hope this helps you and others.

wonzling commented 10 years ago

Thank you very much, I was having also that problem - now it is solved ! Have an solution for Ckeditor?

cwaldau commented 10 years ago

Wonzling,

Instead of using the built in method to display a WYSIWYG, I have just put the code directly into the PHP file using normal installation methods described on CKEDITOR website.

Now there is no "edit in..." button, it will just always load the WYSIWYG editor and never the raw source.

wonzling commented 10 years ago

Thank you I have resolved that.

Self-Evident commented 8 years ago

(Almost two years later, but better late than never? :) Thanks for the resolution cwal. I've seen this issue as well, but only sporadically, so I was never able to do any real troubleshooting. Your solution does work, but it I can't figure out why it's needed. (Because I'm not as smart as I think I am.) Basically, Sort_and_Show() is one of the last things that happens when the index (file list) page loads, so I don't know why it fails to display the files sometimes. Regardless, I'm gonna implement your solution in the next update (3.5.20), and close this at that time.

(Issues using CKEditor will be addressed seperately.)

Self-Evident commented 8 years ago

This issue was figured out & resolved. A different fix than menioned above: the initial call to Sort_and_Show() was moved to the end of the page, after every thing else is loaded, and it seems to have fixed it.