When installing the Shariff library via Composer, the files are in a dist/ subdirectory. It is now correctly detected in shariff.module as per #3039848, but an error still appears in the site admin report. The attached patch fixes this.

Comments

tricasse created an issue. See original summary.

criz’s picture

Status: Active » Needs review
1an’s picture

Assigned: Unassigned » 1an
1an’s picture

Status: Needs review » Closed (cannot reproduce)

Unable to reproduce the issue. The files are not in a dist/ subdirectory and no errors can be seen.

1an’s picture

Status: Closed (cannot reproduce) » Needs review
StatusFileSize
new680 bytes

Please see the proposed patch. Fix of incorrect file_exist checks.

criz’s picture

Status: Needs review » Reviewed & tested by the community

The original patch was working quite okay.

  • criz committed 07f74f4 on 8.x-1.x authored by 1an
    Issue #3051281 by tricasse: An error for shariff.min.js is still shown...
criz’s picture

Assigned: 1an » Unassigned
Status: Reviewed & tested by the community » Fixed

Sorry, I confused the commit credits here. The commit author should be tricasse and not Ian. Reverted the commit and corrected it, but somehow it is not updated so far.

criz’s picture

Btw, it shows right on the profile pages: https://www.drupal.org/u/tricasse

Status: Fixed » Closed (fixed)

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

Lutfiyeturan’s picture

I can't understand the patch logic in the patch #5. It has three !file_exists() conditions separated by OR operators.
That means, if one of these doesn't exist the condition will be true and therefore the requirement error is thrown.

And this doesn't make sense - the requirement error still appears although the patch is applied.

The !file_exists() conditions have to be separated by AND operators.
Additionally the file path in the third condition libraries/dist/shariff/shariff.min.js is wrong - should be libraries/shariff/dist/shariff.min.js.

So here is the updated (working) Patch.