Forum

Thread tagged as: Problem

Incorrect APP1 Exif Identifier Code

I have a blog post page, which includes a link to a template block to add additional images at the bottom of the post. If I upload a blog post image first, then add additional image function isn't available.

If I refresh the page without saving, the add an item option becomes available within the template block.

I'm getting the following error within php:

Warning:  exif_read_data(phpjDdCKU): Incorrect APP1 Exif Identifier Code in /Users/Grant/Dropbox/Sites/150-Dannenberg-Photography/public/perch/core/lib/PerchImage.class.php on line 536

Searching the forum resulted in this post. I followed Drew's advice regarding adding define('PERCH_ENABLE_EXIF', false);, however the issue still occurs.

case_study_post.html

        <perch:block type="additionalImages" label="Additional Images" icon="photos">
          <perch:template path="content/blocks/additional_images.html" />
        </perch:block>

additional_images.html

<div class="columns additional-images">
  <perch:repeater id="case_additional_images" label="Case Study Additional Images" max="3">
    <div class="column is-4">
      <a data-fancybox="gallery" href="<perch:blog id="additional_image" type="image" label="Additional images" filter="cloudinary" opts="w_2000,c_limit" />" data-fancybox="gallery">
        <figure class="image is-5by4 has-overlay">
            <div class="overlay is-flex-centered">
              <span class="icon is-large"><i class="far fa-search-plus"></i></span>
            </div>
          <img class="obj_fit" src="<perch:blog id="additional_image" type="image" />" alt="<perch:blog id="additionalImageAlt" label="Image Alt Text"/>" />
        </figure>
      </a>
    </div>
  </perch:repeater>
</div>
    Perch Runway: 3.1.3, PHP: 7.2.8, MySQL: mysqlnd 5.0.12-dev - 20150407 - $Id: 38fea24f2847fa7519001be390c98ae0acafe387 $, with PDO
    Server OS: Darwin, apache2handler
    Installed apps: content (3.1.3), assets (3.1.3), categories (3.1.3), perch_blog (5.6.1), perch_forms (1.12), chirp_seo (1.4.1)
    App runtimes: <?php $apps_list = [ 'perch_blog', 'perch_forms', 'chirp_seo', ];
    PERCH_LOGINPATH: /perch
    PERCH_PATH: /Users/Grant/Dropbox/Sites/150-Dannenberg-Photography/public/perch
    PERCH_CORE: /Users/Grant/Dropbox/Sites/150-Dannenberg-Photography/public/perch/core
    PERCH_RESFILEPATH: /Users/Grant/Dropbox/Sites/150-Dannenberg-Photography/public/perch/resources
    Image manipulation: GD
    PHP limits: Max upload 32M, Max POST 8M, Memory: 128M, Total max file upload: 8M
    F1: 3b606135b33e6a102526838f4152a807
    Resource folder writeable: Yes
    HTTP_HOST: foodimaging.local
    DOCUMENT_ROOT: /Users/Grant/Dropbox/Sites/150-Dannenberg-Photography/public
    REQUEST_URI: /perch/core/settings/diagnostics/
    SCRIPT_NAME: /perch/core/settings/diagnostics/index.php

Now a little stuck on what to try, the error is present on both localhost and live server.

Grant Smith

Grant Smith 0 points

  • 2 years ago
Hussein Al Hammad

Hussein Al Hammad 105 points
Registered Developer

Hello Grant,

I ran into the issue with image + blocks too. I think it's a separate issue from the EXIF warning you got.

What I found is if an edit form includes an image and some blocks:

<perch:content id="image" type="image" label="Main Image">

<perch:blocks>
    <!--* Some Blocks *-->
</perch:blocks>

When I add an image to the field image first then try to add any block I get some error in the browser console. So I normally add the image first, save and then start adding blocks.

Do you also get an error in the browser console?

Hi Hussein,

I do get a console error yes

Uncaught TypeError: Cannot read property 'indexOf' of undefined
    at y (10.10.6738d5d5f5664f7c5e34.js:1)
    at HTMLDivElement.<anonymous> (10.10.6738d5d5f5664f7c5e34.js:1)
    at Function.each (vendor.6738d5d5f5664f7c5e34.js:2)
    at me.fn.init.each (vendor.6738d5d5f5664f7c5e34.js:2)
    at m (10.10.6738d5d5f5664f7c5e34.js:1)
    at 10.10.6738d5d5f5664f7c5e34.js:1
    at dispatch (vendor.6738d5d5f5664f7c5e34.js:3)
    at v.handle (vendor.6738d5d5f5664f7c5e34.js:3)
    at Object.trigger (vendor.6738d5d5f5664f7c5e34.js:4)
    at vendor.6738d5d5f5664f7c5e34.js:4
Hussein Al Hammad

Hussein Al Hammad 105 points
Registered Developer

That's the same error I get.

So would you class this as a bug, and there nothing I can do currently? Other than your suggested workaround?

Hussein Al Hammad

Hussein Al Hammad 105 points
Registered Developer

Yes, it looks like a bug to me. I'd wait for Drew to have a look at this.

Great, thanks for the help, at least I know and can advise accordingly

Drew McLellan

Drew McLellan 2638 points
Perch Support

Do you get the error with one specific image, or any image from any source?

Hi Drew,

Any image, any source

Drew McLellan

Drew McLellan 2638 points
Perch Support

Is the same happening on dev and prod?

It’s is yes

Drew McLellan

Drew McLellan 2638 points
Perch Support

Could you send us an example image?

Hi Drew,

Sorry for taking so long to provide this. Broadband issues.

In any case, these are just stock images that I have resized to file size. Nothing else has been edited.

DropBox Files

Hussein Al Hammad

Hussein Al Hammad 105 points
Registered Developer

If it helps, I see the same error in the browser console even when selecting an existing image from Perch Assets.