owncloud / gallery

:sunrise: Gallery app for ownCloud, which includes previews for all supported media files
GNU Affero General Public License v3.0
88 stars 65 forks source link

Several pictures and still get 'No pictures found! If you upload pictures in the files app, they will be displayed here.' #69

Closed jsalatiel closed 9 years ago

jsalatiel commented 9 years ago

Gallery+ keeps showing "No pictures found! If you upload pictures in the files app, they will be displayed here." for some users, even though they have plenty of pictures.

The problem appears to be in the top root folder (accessed by clicking apps/gallery+). If i browse to some picture folder in FILES app, i can click the tile button and gallery+ can see the files, and even go up a few folder levels.

Log shows :

{"reqId":"836126f4bdfaa632bcdb2b7e8edd6e06","remoteAddr":"192.168.254.2","app":"index","message":"Exception: {\"Message\":\"\",\"Code\":0,\"Trace\":\"#0 \/var\/www\/owncloud\/lib\/private\/files\/node\/node.php(321): OC\Files\Node\Node->getFileInfo()\n#1 \/var\/www\/owncloud\/apps\/galleryplus\/service\/infoservice.php(165): OC\Files\Node\Node->getType()\n#2 \/var\/www\/owncloud\/apps\/galleryplus\/service\/infoservice.php(220): OCA\GalleryPlus\Service\InfoService->searchFolder(Object(OC\Files\Node\Folder), 6)\n#3 \/var\/www\/owncloud\/apps\/galleryplus\/service\/infoservice.php(178): OCA\GalleryPlus\Service\InfoService->searchSubFolders(Array, 0, 5)\n#4 \/var\/www\/owncloud\/apps\/galleryplus\/service\/infoservice.php(220): OCA\GalleryPlus\Service\InfoService->searchFolder(Object(OC\Files\Node\Folder), 5)\n#5 \/var\/www\/owncloud\/apps\/galleryplus\/service\/infoservice.php(178): OCA\GalleryPlus\Service\InfoService->searchSubFolders(Array, 0, 4)\n#6 \/var\/www\/owncloud\/apps\/galleryplus\/service\/infoservice.php(220): OCA\GalleryPlus\Service\InfoService->searchFolder(Object(OC\Files\Node\Folder), 4)\n#7 \/var\/www\/owncloud\/apps\/galleryplus\/service\/infoservice.php(178): OCA\GalleryPlus\Service\InfoService->searchSubFolders(Array, 0, 3)\n#8 \/var\/www\/owncloud\/apps\/galleryplus\/service\/infoservice.php(220): OCA\GalleryPlus\Service\InfoService->searchFolder(Object(OC\Files\Node\Folder), 3)\n#9 \/var\/www\/owncloud\/apps\/galleryplus\/service\/infoservice.php(178): OCA\GalleryPlus\Service\InfoService->searchSubFolders(Array, 0, 2)\n#10 \/var\/www\/owncloud\/apps\/galleryplus\/service\/infoservice.php(220): OCA\GalleryPlus\Service\InfoService->searchFolder(Object(OC\Files\Node\Folder), 2)\n#11 \/var\/www\/owncloud\/apps\/galleryplus\/service\/infoservice.php(178): OCA\GalleryPlus\Service\InfoService->searchSubFolders(Array, 0, 1)\n#12 \/var\/www\/owncloud\/apps\/galleryplus\/service\/infoservice.php(220): OCA\GalleryPlus\Service\InfoService->searchFolder(Object(OC\Files\Node\Folder), 1)\n#13 \/var\/www\/owncloud\/apps\/galleryplus\/service\/infoservice.php(178): OCA\GalleryPlus\Service\InfoService->searchSubFolders(Array, 0, 0)\n#14 \/var\/www\/owncloud\/apps\/galleryplus\/service\/infoservice.php(139): OCA\GalleryPlus\Service\InfoService->searchFolder(Object(OC\Files\Node\Folder))\n#15 \/var\/www\/owncloud\/apps\/galleryplus\/controller\/servicecontroller.php(169): OCA\GalleryPlus\Service\InfoService->getImages(Array)\n#16 [internal function]: OCA\GalleryPlus\Controller\ServiceController->getImages()\n#17 \/var\/www\/owncloud\/lib\/private\/appframework\/http\/dispatcher.php(158): call_user_func_array(Array, Array)\n#18 \/var\/www\/owncloud\/lib\/private\/appframework\/http\/dispatcher.php(86): OC\AppFramework\Http\Dispatcher->executeController(Object(OCA\GalleryPlus\Controller\ServiceController), 'getImages')\n#19 \/var\/www\/owncloud\/lib\/private\/appframework\/app.php(97): OC\AppFramework\Http\Dispatcher->dispatch(Object(OCA\GalleryPlus\Controller\ServiceController), 'getImages')\n#20 \/var\/www\/owncloud\/lib\/private\/appframework\/routing\/routeactionhandler.php(44): OC\AppFramework\App::main('ServiceControll...', 'getImages', Object(OC\AppFramework\DependencyInjection\DIContainer), Array)\n#21 [internal function]: OC\AppFramework\routing\RouteActionHandler->__invoke(Array)\n#22 \/var\/www\/owncloud\/lib\/private\/route\/router.php(250): call_user_func(Object(OC\AppFramework\routing\RouteActionHandler), Array)\n#23 \/var\/www\/owncloud\/lib\/base.php(767): OC\Route\Router->match('\/apps\/gallerypl...')\n#24 \/var\/www\/owncloud\/index.php(36): OC::handleRequest()\n#25 {main}\",\"File\":\"\/var\/www\/owncloud\/lib\/private\/files\/node\/node.php\",\"Line\":65}","level":4,"time":"2015-03-07T19:49:49-03:00"}

oparoz commented 9 years ago

It seems oC can't read a file located 5 levels lower than root. It would be great if you could identify which folder and file is causing this.

I should also make it so that an exception like this doesn't break the rendering of the whole view.

oparoz commented 9 years ago

Try this branch: https://github.com/interfasys/galleryplus/commits/ignore-broken-nodes or just the patch: https://github.com/interfasys/galleryplus/commit/a08b11204684af78c6938894653d213f09098760.patch

jsalatiel commented 9 years ago

i have applied the patch , the error is gone but i just get a circle spinning forever... Isnt there a way to get a real feedback inside that circle, like how many % of images are being loaded, so we can see if it is really loading or just locked

oparoz commented 9 years ago

The spinning circle means that either the server is not returning anything or the Javascript doesn't understand the reply. I need to re-create the error setup to be able to see what goes wrong.

Percents are not possible as we're exploring the filesystem, but it should be possible to use the same technique used for thumbnails to stream back the list of files as we find them. And once https://github.com/interfasys/galleryplus/issues/29 is implemented, it should be possible to even start building the view as soon as we receive files.

jsalatiel commented 9 years ago

Well, though i still dont know where the problem is, i found out that if i exclude exactly 3 folders (using .nomedia) that contains about 230 picture files, the ~8000 pictures left will load fine in galleryplus. I don't know if the encoding matters, but the folders path have accents:

./Análises/Microscopia(26-04-2012)/.nomedia ./Disciplinas/Técnicas microscópicas de caracterização/.nomedia ./Disciplinas/Processamento de Polímeros/.nomedia

I will try to get at least one folder that crashes at the lowest level, and check the pictures in there.

jsalatiel commented 9 years ago

OK, i have found a subfolder in the leaf of the directory tree containing 28 pictures , and if i do not exclude this folder, galleryplus will keep spinning forever. I've run identify command over those files and i got:

qeusta5 001.jpg JPEG 1700x2338 1700x2338+0+0 8-bit DirectClass 329KB 0.000u 0:00.010 qeustao 5b 001.jpg JPEG 1700x2338 1700x2338+0+0 8-bit DirectClass 104KB 0.000u 0:00.000 quest1a 001.jpg JPEG 1700x2338 1700x2338+0+0 8-bit DirectClass 401KB 0.000u 0:00.000 quest1b 001.jpg JPEG 1700x2338 1700x2338+0+0 8-bit DirectClass 420KB 0.000u 0:00.000 quest1c 001.jpg JPEG 1700x2338 1700x2338+0+0 8-bit DirectClass 326KB 0.000u 0:00.000 quest2a 001.jpg JPEG 1700x2338 1700x2338+0+0 8-bit DirectClass 359KB 0.000u 0:00.000 quest 2b 001.jpg JPEG 1700x2338 1700x2338+0+0 8-bit DirectClass 334KB 0.000u 0:00.000 quest 3 ab 001.jpg JPEG 1700x2338 1700x2338+0+0 8-bit DirectClass 421KB 0.000u 0:00.000 quest4b 001.jpg JPEG 1700x2338 1700x2338+0+0 8-bit DirectClass 102KB 0.000u 0:00.000 questa 4 a 001.jpg JPEG 1700x2338 1700x2338+0+0 8-bit DirectClass 286KB 0.000u 0:00.000 questa 4c 001.jpg JPEG 1700x2338 1700x2338+0+0 8-bit DirectClass 88.7KB 0.000u 0:00.000 questao 10 001.jpg JPEG 1700x2338 1700x2338+0+0 8-bit DirectClass 300KB 0.000u 0:00.000 questao 10b 001.jpg JPEG 1700x2338 1700x2338+0+0 8-bit DirectClass 198KB 0.000u 0:00.000 questao 11b 001.jpg JPEG 1700x2338 1700x2338+0+0 8-bit DirectClass 159KB 0.000u 0:00.000 questao 12b 001.jpg JPEG 1700x2338 1700x2338+0+0 8-bit DirectClass 198KB 0.000u 0:00.000 questao 13 001.jpg JPEG 1700x2338 1700x2338+0+0 8-bit DirectClass 184KB 0.000u 0:00.000 questao 14 001.jpg JPEG 1700x2338 1700x2338+0+0 8-bit DirectClass 300KB 0.000u 0:00.000 questao 14b 001.jpg JPEG 1700x2338 1700x2338+0+0 8-bit DirectClass 134KB 0.000u 0:00.000 questao 15 001.jpg JPEG 1700x2338 1700x2338+0+0 8-bit DirectClass 330KB 0.000u 0:00.000 questao 15b 001.jpg JPEG 1700x2338 1700x2338+0+0 8-bit DirectClass 207KB 0.000u 0:00.000 questao 3c 001.jpg JPEG 1700x2338 1700x2338+0+0 8-bit DirectClass 349KB 0.000u 0:00.000 questao 5 001.jpg JPEG 1700x2338 1700x2338+0+0 8-bit DirectClass 170KB 0.000u 0:00.000 questao 7 001.jpg JPEG 1700x2338 1700x2338+0+0 8-bit DirectClass 414KB 0.000u 0:00.000 questao 8 001.jpg JPEG 1700x2338 1700x2338+0+0 8-bit DirectClass 406KB 0.000u 0:00.000 questao 9 001.jpg JPEG 1700x2338 1700x2338+0+0 8-bit DirectClass 404KB 0.000u 0:00.000 questao 9a 001.jpg JPEG 1700x2338 1700x2338+0+0 8-bit DirectClass 336KB 0.000u 0:00.009 quetao 11 001.jpg JPEG 1700x2338 1700x2338+0+0 8-bit DirectClass 294KB 0.000u 0:00.000 quetsao 12 001.jpg JPEG 1700x2338 1700x2338+0+0 8-bit DirectClass 245KB 0.000u 0:00.000

jsalatiel commented 9 years ago

I left just one single file/image in the folder and it will break the whole processing. identify -verbose shows: Image: qeusta5 001.jpg Format: JPEG (Joint Photographic Experts Group JFIF format) Class: DirectClass Geometry: 1700x2338+0+0 Resolution: 200x200 Print size: 8.5x11.69 Units: PixelsPerInch Type: TrueColor Endianess: Undefined Colorspace: sRGB Depth: 8-bit Channel depth: red: 8-bit green: 8-bit blue: 8-bit Channel statistics: Red: min: 0 (0) max: 255 (1) mean: 249.093 (0.976837) standard deviation: 23.334 (0.091506) kurtosis: 26.7295 skewness: -4.90083 Green: min: 0 (0) max: 255 (1) mean: 249.067 (0.976733) standard deviation: 23.453 (0.0919726) kurtosis: 27.3576 skewness: -4.93306 Blue: min: 0 (0) max: 255 (1) mean: 249.065 (0.976726) standard deviation: 23.2456 (0.0911593) kurtosis: 25.9803 skewness: -4.84468 Image statistics: Overall: min: 0 (0) max: 255 (1) mean: 249.075 (0.976765) standard deviation: 23.3444 (0.0915466) kurtosis: 26.6989 skewness: -4.89334 Rendering intent: Perceptual Gamma: 0.454545 Chromaticity: red primary: (0.64,0.33) green primary: (0.3,0.6) blue primary: (0.15,0.06) white point: (0.3127,0.329) Interlace: None Background color: white Border color: srgb(223,223,223) Matte color: grey74 Transparent color: black Compose: Over Page geometry: 1700x2338+0+0 Dispose: Undefined Iterations: 0 Compression: JPEG Quality: 89 Orientation: TopLeft Properties: date:create: 2015-03-08T08:57:15-03:00 date:modify: 2013-02-09T10:33:54-03:00 exif:DateTime: 2012:07:07 13:33:27 exif:ExifOffset: 2216 exif:ImageUniqueID: 8DB88485AB6A44F68262C5D17E19634F exif:Orientation: 1 exif:Software: Microsoft Windows Live Photo Gallery14.0.8117.416 exif:WinXP-Keywords: 113, 0, 101, 0, 117, 0, 115, 0, 116, 0, 97, 0, 53, 0, 0, 0 jpeg:colorspace: 2 jpeg:sampling-factor: 2x2,1x1,1x1 MicrosoftPhoto:DateAcquired: 2012-05-21T12:18:50.066 rdf:Bag: signature: 5471de4cf5c322b6f81f8e6182126e97a76f9effad95562e2ef39c57eb373081 unknown: 28, 234, 0, 0, 0, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 xmp:CreatorTool: Microsoft Windows Live Photo Gallery14.0.8117.416 Profiles: Profile-exif: 4318 bytes Profile-xmp: 3021 bytes Artifacts: filename: qeusta5 001.jpg verbose: true Tainted: False Filesize: 329KB Number pixels: 3.975M Pixels per second: 66.24MB User time: 0.060u Elapsed time: 0:01.059 Version: ImageMagick 6.7.7-10 2014-03-06 Q16 http://www.imagemagick.org

oparoz commented 9 years ago

Thanks! So these files can be seen on the files app and and have thumbnails there?

What happens if you rename that test file?

And there are 2 issues here:

  1. I need to properly ignore files which can't be read
  2. I need to figure out if it's a core or Gallery+ issue.
jsalatiel commented 9 years ago

Yes, they can be seen on FIles App and they have the small thumbnails. If from the folder i click on the "Tile Icon" that opens galleryplus i get the "No pictures found! If you upload pictures in the files app, they will be displayed here."

oparoz commented 9 years ago

And do you get large previews?

jsalatiel commented 9 years ago

If by large preview you mean that clicking in the file name the picture will open, yes , i do.

oparoz commented 9 years ago

OK, so the app should not ignore it. The problem is why doesn't it have a proper node type... I did try with a corrupt JPG here and the app has properly ignored it.

oparoz commented 9 years ago

If you enable the Firefox debugger and go to the network tab, there is a request made to images?currentfolder= What is the "Response" that you get?

jsalatiel commented 9 years ago

I have to admit that it is really strange. I copied the file to another user folder and there galleryplus display the file just fine. I am starting to guess there's something about the whole path.

Original user has that file inside $USER/netbook/documentos/Desktop/Mask - Mask/Disciplinas/Técnicas microscópicas de caracterização/LISTA MASK/ Copied User has that image in $USER//photos/

jsalatiel commented 9 years ago

in firefox debugger i can see the correct PATH , including all accents in the currentfolder param

jsalatiel commented 9 years ago

I get message: "Oh Nooooes!"
success:false

oparoz commented 9 years ago

OK, you get this message because the failure happens in the current folder.

My theory is that the filesystem is corrupt. That folder is not reachable. If you move these pictures one folder up, you should be able to see them in gallery mode and if you put any picture in that folder it won't show.

oparoz commented 9 years ago

If this is confirmed, I'd still like to be able to ignore that folder properly. Being in the folder above it, you should be getting pictures and albums of everything else.

jsalatiel commented 9 years ago

Why does it load fine in Files app ?

sudo fsck -Cvyf /dev/mapper/OWNCLOUD fsck from util-linux 2.20.1 e2fsck 1.42.9 (4-Feb-2014) Pass 1: Checking inodes, blocks, and sizes Pass 2: Checking directory structure
Pass 3: Checking directory connectivity
Pass 4: Checking reference counts Pass 5: Checking group summary information

   51371 inodes used (0.26%, out of 19660800)
    1019 non-contiguous files (2.0%)
      53 non-contiguous directories (0.1%)
         # of inodes with ind/dind/tind blocks: 0/0/0
         Extent depth histogram: 51113/228
33854866 blocks used (43.05%, out of 78642688)
       0 bad blocks
      10 large files

   44666 regular files
    6674 directories
       0 character device files
       0 block device files
       0 fifos
       0 links
      22 symbolic links (22 fast symbolic links)
       0 sockets

   51362 files
oparoz commented 9 years ago

By virtual filesystem, I mean the one built by oC to reference files and folders, maybe the cache is simply corrupt.

jsalatiel commented 9 years ago

Just moved the whole folder to root directory. GalleryPlus still keeps spinning forever. But it will load just fine if i enter the folder and click the tile icon.

Any other information i can provide ?

jsalatiel commented 9 years ago

How can i clear the cache ?

oparoz commented 9 years ago

Since the folder is the one which has problems, you need to move the pictures out of that folder and into another one named just the same.

Now, when the problematic folder is empty, it should still break the rendering of the gallery, the only way to stop it doing that would be to put a ".nomedia" file in the folder above it. Something you could do is rename the folder to see if it refreshes the cache.

I'd like you to keep at least one broken one to see if I can build a workaround.

jsalatiel commented 9 years ago

1) Create the folder ../LISTA.BAK 2) mv ORIGINAL_FOLDER/* ../LISTA.BAK 3) ls -la ORIGINAL_FOLDER shows the .nomedia, but galleryplus spinning forever 4) touch ../LISTA.BAK/.nomedia -> Now it is loading fine 5) rm ORIGINAL_FOLDER/.nomedia -> It still loads fine

oparoz commented 9 years ago

I meant moving and renaming in oC, but I guess it also works from the console :)

EDIT: I reread and so it seems it was a problem with the folder

Try moving the files to another folder which is not directly above the broken one so that we can confirm that files are fine.

In the patch you're trying, I've silenced the error, but let's see if there is something interesting in there.

I can't simulate the problem in my setup. If I return an empty string or throw an exception, things work as expected and the folder disappears.

jsalatiel commented 9 years ago

Yes, LISTA.BAK is blocking. i have replaced the return line, but nothing appears in the logs, just the circle spinning ...

oparoz commented 9 years ago

Just to be sure, you have to be one folder above LISTA.BAK to get something in the logs

jsalatiel commented 9 years ago

mv LISTA.BAK /owncloud/$USER/files/ > now it is on the top folder still spinning ... but it loads fine if i click the folder and click the tile icon (Is that icon named TILE ? lol )

oparoz commented 9 years ago

LISTA.BAK will keep blocking things if ORIGINAL_FOLDER is below it.

If you want to see the pictures you need this structure

Root
- LISTA.BAK
-- JPG pictures
- Test Folder
-- .nomedia
-- ORIGINAL_FOLDER

To try and throw an exception, you need to delete the .nomedia file and load the gallery from the root.

jsalatiel commented 9 years ago

Ok. Here how it is right now ROOT

This setup makes gallery spinning when loaded from root.

Sorry my english, maybe i have misunderstood some comment

oparoz commented 9 years ago

OK, so, with that setup, you should be getting something in the logs if you're in the root, no? If not, then maybe it's another folder operation which is blocking the rendering

Also, if you add a ".nomedia" file to /netbook/documentos/Desktop/MASK - MASK/Disciplinas/Técnicas Microscópicas de caracterização, you should be able to see the gallery. If not, then it must really be a problem with some files...

jsalatiel commented 9 years ago

No logs at all :/ 1) If i 'touch LISTA.BAK/.nomedia' gallery loads fine. 2) If i 'mv LISTA.BAK to /owncloud/ANOTHERUSER/files/' (deleting the created .nomedia from the pass above) the folder will show just fine on the gallery of the ANOTHERUSER. (ANOTHERUSER is admin, dont know if this matters)

Should i try to clear the oc_filecache from the database ?

oparoz commented 9 years ago

Could you try moving these picture from LISTA.BAK to another folder, but using ownCloud to move them? It should be possible to create a folder in LISTA.BAK, move files in there, then move that folder to the root.

jsalatiel commented 9 years ago

Sure, created BROKEN folder inside LISTA.BAK, move all pictures to BROKEN, and moved broken to ROOT Folder. Every operation using the owncloud webinterface. GalleryPlus still spinning with nothing on logs. Should i enable DEBUG in logs ?

oparoz commented 9 years ago

Yes, enabling DEBUG would help, but it seems this problem is different than the original one. I just don't know where it's happening.

oparoz commented 9 years ago

I just thought of something... Creating files and folders on the OS filesystem used to not be supported as it would not create the entries in the file cache. Are those files and folder listed in your cache?

oparoz commented 9 years ago

See if this helps with the spinning: https://github.com/interfasys/galleryplus/commit/a843ba986a521ecbcb8357de955105bcd8926515

jsalatiel commented 9 years ago

With DEBUG enabled i get this related to galleryplus:

{"reqId":"5377b8b804de8c527166fbfa411c7d13","remoteAddr":"192.168.254.2","app":"galleryplus","message":"Supported Mimes: [\"image\/png\",\"image\/jpeg\",\"image\/gif\",\"image\/x-xbitmap\",\"image\/bmp\",\"image\/tiff\",\"image\/x-dcraw\",\"application\/x-photoshop\",\"application\/illustrator\",\"application\/postscript\",\"image\/svg+xml\"]","level":0,"time":"2015-03-08T14:04:50-03:00","method":"GET","url":"\/owncloud\/index.php\/apps\/galleryplus\/images?currentfolder="}

jsalatiel commented 9 years ago

About the "Creating files and folders on the OS filesystem..." question, if i do: select * from oc_filecache where name like '%qeusta5%'; i can see the file on BROKEN folder, so yes, it caches. (Isn't cron script used to create this cache entries ?)

oparoz commented 9 years ago

OK, about the cache. Do the files have the proper mimetype? You'll find 2 numbers and can find the mimetypes linked to these numbers in the mimetypes table.

jsalatiel commented 9 years ago

select cache.name,mime.mimetype from oc_filecache cache ,oc_mimetypes mime where cache.name like '%qeusta5%' and cache.mimetype=mime.id; +-----------------+------------+ | name | mimetype | +-----------------+------------+ | qeusta5 001.jpg | image/jpeg |

i think so

jsalatiel commented 9 years ago

still spinning forever after a843ba9

oparoz commented 9 years ago

"*%@#¬ :) What are the storage ID and permissions for those files? Any different than the others?

And do you have file locking enabled?

jsalatiel commented 9 years ago

mysql> select cache.name,cache.storage,cache.permissions,mime.mimetype from oc_filecache cache ,oc_mimetypes mime where cache.name like '%qeusta5%' and cache.mimetype=mime.id; +-----------------+---------+-------------+------------+ | name | storage | permissions | mimetype | +-----------------+---------+-------------+------------+ | qeusta5 001.jpg | 4 | 27 | image/jpeg |

Is there a way to clone some branch in git ? I am manually patching using your diffs. It would be nice just some git pull =)

oparoz commented 9 years ago

Ah, yes, of course

# git clone -b ignore-broken-nodes https://github.com/interfasys/galleryplus.git

And is that storage ID the same everywhere?

jsalatiel commented 9 years ago

mysql> select distinct(cache.storage) from oc_filecache cache ;+---------+ | storage | +---------+ | 1 | | 2 | | 3 | | 4 | | 5 | | 7 | | 9 | +---------+ 7 rows in set (0.01 sec)

Each user has a different storage ? I have exactly seven users :) ops, actually i have 5 users :)

oparoz commented 9 years ago

OK about storage. Regarding the mods, you should be getting them. I've just pushed a new change. See if you can pull it. If you were already on master, simply changing branch via checkout should do.

BTW, in isPreviewAvailable, there is some debug code available. Uncomment it and see if you get paths. I'm wondering if I'm not chopping the paths in half...

jsalatiel commented 9 years ago

I get the no pictures found after pulling ...

{"reqId":"7cefa182b932a2f207fd76958860bda8","remoteAddr":"192.168.254.2","app":"galleryplus","message":"Supported Mimes: [\"image\/png\",\"image\/jpeg\",\"image\/gif\",\"image\/x-xbitmap\",\"image\/bmp\",\"image\/tiff\",\"image\/x-dcraw\",\"application\/x-photoshop\",\"application\/illustrator\",\"application\/postscript\",\"image\/svg+xml\"]","level":0,"time":"2015-03-08T15:10:20-03:00","method":"GET","url":"\/owncloud\/index.php\/apps\/galleryplus\/images?currentfolder="} {"reqId":"7cefa182b932a2f207fd76958860bda8","remoteAddr":"192.168.254.2","app":"galleryplus","message":"Sub-Node path : \/USUARIO\/files\/BROKEN","level":0,"time":"2015-03-08T15:10:20-03:00","method":"GET","url":"\/owncloud\/index.php\/apps\/galleryplus\/images?currentfolder="} {"reqId":"7cefa182b932a2f207fd76958860bda8","remoteAddr":"192.168.254.2","app":"galleryplus","message":"Sub-Node path : \/USUARIO\/files\/LISTA MASK","level":0,"time":"2015-03-08T15:10:20-03:00","method":"GET","url":"\/owncloud\/index.php\/apps\/galleryplus\/images?currentfolder="} {"reqId":"7cefa182b932a2f207fd76958860bda8","remoteAddr":"192.168.254.2","app":"galleryplus","message":"Sub-Node path : \/USUARIO\/files\/Lattes - Certificados","level":0,"time":"2015-03-08T15:10:20-03:00","method":"GET","url":"\/owncloud\/index.php\/apps\/galleryplus\/images?currentfolder="} {"reqId":"7cefa182b932a2f207fd76958860bda8","remoteAddr":"192.168.254.2","app":"galleryplus","message":"Sub-Node path : \/USUARIO\/files\/Lattes - Certificados.zip","level":0,"time":"2015-03-08T15:10:20-03:00","method":"GET","url":"\/owncloud\/index.php\/apps\/galleryplus\/images?currentfolder="} {"reqId":"7cefa182b932a2f207fd76958860bda8","remoteAddr":"192.168.254.2","app":"PHP","message":"Undefined variable: file at \/var\/www\/owncloud\/apps\/galleryplus\/service\/infoservice.php#284","level":3,"time":"2015-03-08T15:10:20-03:00","method":"GET","url":"\/owncloud\/index.php\/apps\/galleryplus\/images?currentfolder="} {"reqId":"7cefa182b932a2f207fd76958860bda8","remoteAddr":"192.168.254.2","app":"PHP","message":"Call to a member function getFileInfo() on a non-object at \/var\/www\/owncloud\/apps\/galleryplus\/service\/infoservice.php#284","level":3,"time":"2015-03-08T15:10:20-03:00","method":"GET","url":"\/owncloud\/index.php\/apps\/galleryplus\/images?currentfolder="}

oparoz commented 9 years ago

OK, so at least we get an error now. Can you upgrade to 8.0.1 (gold) and see if it helps? EDIT: The error was triggered by my mistake

jsalatiel commented 9 years ago

I am using 8.0.1RC1 , where can i get this GOLD version ?