Use of drupal_realpath is not recommended. Fails to process for remote schemas, and get the following errors
exif_read_data(): Filename cannot be empty in exif_custom_get_exif_fields()

etc

Suggest changing to file_create_url. I'll submit a patch shortly.

Comments

michaelmallett created an issue. See original summary.

michaelmallett’s picture

Status: Active » Needs review
StatusFileSize
new1.03 KB

Status: Needs review » Needs work

The last submitted patch, 2: exif_custom-change_drupal_realpath_function-2643818-2-7.patch, failed testing.

michaelmallett’s picture

The dispatcher says that this patch failed due to no tests being specified, can anyone help with getting that sorted? Patch should be fine, is there something else I'm supposed to do?

leon kessler’s picture

This patch breaks when you upload a file to create the new mapping (as this uses the temporary file schema, which does not work with file_create_url())

michaelmallett’s picture

Remind me, this was because file_create_url can't create a url from temp:// ?

leon kessler’s picture

Yep it wasn't working when you uploaded a new mapping.
Although it look like the temporary file schema does support external urls (https://api.drupal.org/api/drupal/includes%21stream_wrappers.inc/functio...)
But I don't think they were resolving properly.

joseph.olstad’s picture

Status: Needs work » Needs review

Status: Needs review » Needs work
damienmckenna’s picture

StatusFileSize
new1.06 KB

Rerolled.

damienmckenna’s picture

Status: Needs work » Needs review

damienmckenna’s picture

Status: Needs review » Fixed
Parent issue: » #2926380: Plan for EXIF Custom 7.x-1.18

Committed. Thanks.

damienmckenna’s picture

FYI I had to add an option to use the old method as it caused problems, see #2928054: Add back support for drupal_realpath() for sites with complicated setups.

joseph.olstad’s picture

as per comment #5 this patch causes:
#2929232: Can't upload example image

joseph.olstad’s picture

Status: Fixed » Needs work

Reviewing the regression.

damienmckenna’s picture

joseph.olstad’s picture

still doesn't work for me, either option fails.
same error.
Also, there's a type-o on line 657

$size = @getimagesize($image_url, $info);

should be:
$size = getimagesize($image_url, $info);

however, same issue either way.

still trying to figure this out

joseph.olstad’s picture

sorry ya my bad, this is good here, followup in #2929232: Can't upload example image

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.