PoeticMediaLab / Lacuna

Lacuna: Digital Annotation for Teaching and Learning
http://www.lacunastories.com
GNU General Public License v2.0
36 stars 20 forks source link

Images not loading on Lacunastories site #208

Closed pguerr061703 closed 7 years ago

pguerr061703 commented 7 years ago

I am running Lacunastories on a virtual host running Ubuntu 16.04 When you create a course, or add materials to a course you must add an image or you can't progress/save what you do. I seem to be able to add the images that represent the courses and the materials, but then they don't show up when I save the material, (upon viewing the site). Where do images (for courses in Lacunastories) get saved? What directory? Is this a permission issue? Can someone please help me? Faculty members are getting frustrated that they don't see the images for their courses.

dabush commented 7 years ago

Hi, sorry you're having this problem. I suspect it is a permissions issue, and @mwidner can tell me if I'm wrong, but I wanted to confirm that by default the files get stored in site/default/files (and then in various sub-directories depending on how they're being uploaded).

mwidner commented 7 years ago

Yes, that's the directory that get saved to. You can try clearing all the caches. Also, check that the directory in which the files gets saved are writable for the web server.

dabush commented 7 years ago

Also to be more precise, the course image goes to site/default/files, the course image as it is displayed on the front page goes to site/default/files/styles/course-views-style/public

mwidner commented 7 years ago

Right, but these are all automatically generated by Lacuna. It sounds like the sites/default/files directory isn't writable by the web server. Here's some troubleshooting documentation: https://www.drupal.org/docs/7/install/setting-up-the-files-directory

pguerr061703 commented 7 years ago

Its still not working. faculty still cannot load images, and I confirmed the directory permissions:

root@servername # /var/www/html/sites/default# ls -tlr total 76 -rw-r--r-- 1 root root 23557 Feb 1 19:26 settings.php -rw-r--r-- 1 root root 23196 Mar 20 17:03 default.settings.php drwxrwx--- 10 www-data root 4096 Apr 25 13:59 files root@servername # /var/www/html/sites/default#

Maybe the parent director /var/www/html/sites need to be chmod to 777 ?? root@servername # /var/www/html# ls -ld sites drwxr-xr-x 4 root root 4096 Jan 26 12:25 sites

mwidner commented 7 years ago

Try this:

chown -R www-data:www-data /var/www/html/sites/default/files drush image-flush --all

Then, if you're still having a problem, try uploading a new image, then check the web server's logs and the Drupal logs to see if there were any error messages.

pguerr061703 commented 7 years ago

The last command gave me an error regarding bootstrap ?

drush image-flush --all

Command image-flush needs a higher bootstrap level to run - you will [error] need to invoke drush from a more functional Drupal environment to run this command. Command image-flush requires Drupal core version 7+ to run. [error] The drush command 'image-flush' could not be executed. [error] A Drupal installation directory could not be found [error]

mwidner commented 7 years ago

You have to run drush from within the site's directory. So, be sure to be inside the Lacuna directory first, before trying the drush command.

pguerr061703 commented 7 years ago

Thank you.