EXIF grabbing don't work with "on the fly"?

Question: Are the Exif data from an image file automatically grabbed on-the-fly and written to the database?
A test says no.

Next question: Are the Exif data from an image file automatically grabbed when the image edit page is called and written to the database?
A test says no.

Next question: Does "Metatag refresh" always have to be clicked when new photos are put online? Why not automatically?

Is the problem only with me? I have not yet clicked "Metatag refresh".

Comments

  • acrylian Administrator, Developer

    1 Yes, meta data is fetched on the fly (= on discovery). But make sure that you checked really all metadata fields needed on the options.

    2 Yesno, if the visit to that page is the discovery of the image.

    3 No, this is for a refresh of existing images (or if you replaced an existing image with a same named one with different metadata).

  • wibbi Member

    1 Yes, meta data is fetched on the fly (= on discovery). But make sure that you checked really all metadata fields needed on the options.

    Don't work by me.

    All images are scanned and have an entrie in the database. All without Metadata.
    When i visit the images in the frontend image pages, the EXIF meta tags are not grabbing and writing in the database. Same by the image edit page visits. Only the Metadata refresh button grab and write in the database.

  • acrylian Administrator, Developer

    Might be a bug or as coded, we'll have to reproduce first

  • wibbi Member

    Details: After my tests I created a new database table images for the migration and forgot the columns for IPTC and EXIF. I have created this after the first scan of all photos. (By the way, no photo will be displayed in the frontend if those columns are missing, which is why I noticed it in the debug_log.)

    Question: Is the code written in such a way that if there is already an entry in the images table, but without metadata, the metadata will not be scanned automatically, but only if there is no database entry yet?

  • acrylian Administrator, Developer

    You always need to run setup to ensure that all tables needed are present if you deleted one for example. pathtoyourinstall/zp-core/setup/ (given that those files are not protected).

    If there are data it should not be overwritten on existing images unless you refresh manually.

  • When I upload a new image (I use FTP and place it into the albums structure), it reads the EXiF and IPTC data right as I browse to the image as the title, caption, and keywords are populated. When I click to edit the image, everything is there and then I click the checkbox to publish it. So, something odd is going on there.

  • vincent3569 Member, Translator
    edited March 2018

    @MarkRH: not clear for me. you have an issue or all works fine?
    as far I can read and as far I know the zenphoto behavior, your describe seems to be OK.

    @wibbi: all works fine on my prod/test site.
    when I upload a new image by FTP, all EXIF or IPTC data are grabbed "on the fly" when I visit this image, from the FE, when I visit the relevant album, and from the BE when I visit the admin>albums>images.
    when I upload a new image by admin>upload, all EXIF or IPTC data are grabbed during upload processing.

    as told by acrylian you have to choose your EXIF or IPTC data in admin>images>metadata

  • wibbi Member

    OK, so it's the case that all metadata is written to the database only by the detection scan, but subsequent metadata is not renewed/refresh automatically "on the fly". Then you have to click refresh metadata.
    So there is only a detection scan on the fly, but no refresh on the fly.

  • vincent3569 Member, Translator

    according to you, what are subsequent metadata?

    I often change metadata on my pictures (ie title or gps data).
    then, I upload my pictures again and in that case, metadata are refreshed on the fly.

    btw, test case I never tried : enable an exif data (ie altitude) after the 1st discover of picture.
    according to me, it needs to manually refresh metadata.

  • wibbi Member
    edited March 2018

    Latitude, Longitude. only.

    I have now clicked on the overview page the button "Refresh metadata". Now the page is constantly being reloaded. This is blocked in Firefox. I had to click each time. Then I switched to Chromium. Now the site loads hundreds of times. And there is no information about how often that reloads and how long that will take. There are ~ 15,000 files.

    Refresh Metadata
    Metadata refresh is incomplete

    This process should continue automatically. If not press:

    Continue!

    OK, maybe it's just because the database table "images" was not complete when scanning the files.

    This helps a little bit.

    <?php
    $dbcon = new mysqli("localhost", "user", "passwort", "database");
    
    if (!$dbcon) {
    $mysqliconnecterror = mysqli_connect_error();
    exit("Connect failed: %s\n $mysqliconnecterror");
    }
    
    $result = mysqli_query($dbcon, "SELECT COUNT(*) AS total, COUNT(EXIFGPSLatitude) AS counter FROM images");
    
    $result_fetch = mysqli_fetch_assoc($result);
    
    $total = $result_fetch['total'];
    $counter = $result_fetch['counter'];
    
    echo $total;
    echo "<br>";
    echo $counter;
    echo "
  • wibbi Member
    edited March 2018

    I have tested it. With re-uploaded image files, the EXIF Metadata refresh works "on the fly" in the frontend. All you have to do is visit the album page in the frontend.
    Then it was because the EXIF / IPTC columns in the database table images were not present in the detection scan.

  • WEll, I guess if there is no column in the database to store the metadata it would be pretty hard to save it. If you make changes it is best to run setup to insure that you have not done something to break things (as seems to be this case.)

  • wibbi Member

    At the time of the detection scan they were not there, after that they were already there. But there is no afterthought on the fly, just a detection on the fly. So no second on the fly. Yes, it was a problem that the columns did not exist on the detection scan.

  • So, you make a wrong change to the database and don't get the fields you removed populated. You don't follow the process that the software recommends of running setup if you make changes to detect any issues. And you think this is a bug?

  • wibbi Member
    edited March 2018

    @sbillard, please read the topic. No bug, only questions.

  • The topic says "EXIF grabbing don't work with "on the fly"?"

    But it does.

  • wibbi Member

    Yes, the mistake was mine. Thanks for the answers.

Sign In or Register to comment.