Hello, I've followed all of the instructions and I upgraded to the most recent version of Galleria. This was working on the previous version and now when I create a Galleria it says Galleria Not Valid and no images show up in the post.

Does this have anything to do with using the latest version?

By the way your advice about the Upload path module worked great, now if I could just figure this out I'll be set.

Thanks,

Will

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

BKWill’s picture

I reverted back to an older version of Galleria (from Dec. 3rd /galleria-6.x-1.x-dev ) and everything is working fine. I have no idea why this is and would love to upgrade to the latest stable version.

Thanks,

Will

Mark Theunissen’s picture

Hi Will,

There are no stable versions of Galleria - the code is in beta, which means it's still liable to change. The most recent warning you are getting is due to new code that I have added to check whether a node is a valid galleria.

Part of this new check is to ensure that all attached files have an image extension. I would imagine this is where your node is failing....

'jpg', 'png', 'jpeg', 'gif'

are the extensions it's looking for.

Does that help?

squinci’s picture

Hi Mark!

I still have the same issue in spite of your recommandation for the file format (I have 2 .jepg files for testing).

I enabled the Attachments and Gallleria into Workflow settings into my content type. I attached 2 .jepg with the File Attachment section and when I display my node I get the error message.

Any idea?

Steph

BKWill’s picture

Thanks Mark,

I'm attempting to create a Galleria with .jpg files. I looked at the function your speaking about, it gives me an error message referring to that. I don't know enough about php to understand why that's happening.

Will

Happy Holidays

squinci’s picture

Hi Mark,

I found our issue into function galleria_is_valid(): .jpeg is actually not support because we check the file extension by keeping the 3 last characters only...

Stephane

Mark Theunissen’s picture

Thanks, I will look into it next year... I will start by changing the error message to be something more specific, so we can see where the problem is.

squinci’s picture

I also forgot: the test is also case-sensitive...maybe it is a bit too restrictive?

Mark Theunissen’s picture

Yeah... that's probably it ... :P

Apologies, will sort it out in the New Year!

shark’s picture

Yeah I ran into this as well, due to .JPG images. File rename to .jpg fixed things.

Mark Theunissen’s picture

also need to check that the extension is not 4 characters.

Mark Theunissen’s picture

Status: Active » Fixed

Fixed in Beta 2

markpenny’s picture

FileSize
5.63 KB

I've added JPG, JPEG, PNG and GIF to line 30 of galleria.module (allowed extensions). Hope nobody minds. Just be sure you delete .txt from the file name when you upload.

markpenny’s picture

FileSize
6.6 KB

Sorry. Here's an up-to-date (beta 2) galleria.module with line 28 amended to include uppercase extensions. Of course, I don't know enough about code to know whether the uppercase versions are necessary. Just trying to be helpful.

Remember to delete the .txt file extension when you upload.

Mark Theunissen’s picture

Actually the following line of code in Galleria ensures that you don't need to include uppercase and lowercase values in the allowed extensions list:

$ext = strtolower(substr($file->filename, -4));

It means "take the last four characters of the filename, convert them to lowercase". So the comparison will always be between two lowercase extensions.

But thanks anyway ;)

markpenny’s picture

You're welcome. I reckoned you might have worked some sort of magic like that.

Mark Theunissen’s picture

Status: Fixed » Closed (fixed)