Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

batch_manager metadata sync meta_all #1296

Closed
7tonin opened this issue Jan 23, 2021 · 10 comments
Closed

batch_manager metadata sync meta_all #1296

7tonin opened this issue Jan 23, 2021 · 10 comments

Comments

@7tonin
Copy link
Contributor

7tonin commented Jan 23, 2021

Hi,
I'm using Piwigo 11.1.0
I have a problem syncing IPTC tags on an updated gallery with batch manager. It pretends doing the job "Metadata synchronized from file : 12 files", but no IPTC are updated.

Workaround : it is still possible to update IPTC with:

  • album sync, with meta_all checked "even already synchronized photos"; and also with
  • edit single photo, sync metadata.

So I investigated with a fresh install, and the problem is confirmed. I would like "meta_all checked" like behaviour in batch manager, but is it what piwigo team wants ?

Within (piwigo)/local/config/config.inc.php there are still:

$conf['show_iptc'] = true; 
$conf['use_iptc'] = true;
@exekutive
Copy link
Contributor

IPTC is not synced by default. Some users may not want this. Instructions for enabling is in the documentation.
https://piwigo.org/doc/doku.php?id=user_documentation:metadata

@7tonin
Copy link
Contributor Author

7tonin commented Jan 30, 2021

Thank you for pointing out the documentation.
The fact is I suspect some changes in batch_manager process since Piwigo 11 update. Indeed before this update batch_manager metadata sync was working like a charm, and now, no IPTC update anymore.
I think my local/config/config.inc.php file is fine. Indeed it is well handled by both site_update process and single photo edit metadata sync. Both are updating IPTC data.
If you have any clue how to dig this bug, specificaly in batch_manager process, that would help me. Until now, I have just dropped some error_log() lines to try to figure out what's going on inside.

@7tonin
Copy link
Contributor Author

7tonin commented Jan 30, 2021

...
Please, have a look at js code powering batch_manager page. You may find the typo (typographical error) that explains my problem, and maybe others related with "metadata syncing" in this page. I have been able to see this problem with IPTC because my configuration code binds IPTC with piwigo default metadata handling (and I watch IPTC much more than others metadatas).
I submitted a pull request to solve batch_manager metadata handling, which is currently impaired by a missing closing square braket in a jQuery statement.

@exekutive
Copy link
Contributor

Nevermind. I misunderstood your original post.

@7tonin
Copy link
Contributor Author

7tonin commented Jan 31, 2021

If only I had described more precisely how to reproduce this bug... if only...
The confusion is maybe coming from my said "fresh install" without telling clearly I added a crafted (piwigo)/local/config/config.inc.php enabling IPTC.
Maybe, maybe, maybe... Anyhow, it seems we ended in mutual understanding.

This bug is reproducible with default EXIF metadata support, but it needs a way to edit one picture default metadata, for instance with exiftool in bash (3 lines : read, write, read):

exiftool -dateTimeOriginal ~/path_to_piwigo/galleries/directory_01/file_01.jpg ;
exiftool -overwrite_original -dateTimeOriginal='2025:01:31 00:03:09' ~/path_to_piwigo/galleries/directory_01/file_01.jpg ;
exiftool -dateTimeOriginal ~/path_to_piwigo/galleries/directory_01/file_01.jpg ;

Then use the 3 ways to update metadata to see what's going on:

  • page=photo-# single photo edit; or
  • page=site_update with sync files, both checked syn_meta and meta_all; or
  • page=batch_manager.

Beware, in single photo edit page, once sync metadata is done ("Synchronize metadata" button), the page does not display the updated date (another confusing thing here ! Is my browser involved ?). You need to reload the page to see the change (without syncing again), or to go to picture page in the gallery. The nice thing is, on picture page, the possibility to compare metadata from the database, and from the file. Thanks "Show file metadata" button.

@7tonin
Copy link
Contributor Author

7tonin commented Feb 2, 2021

I realize this problem to be more complicated than I expected :

  • with my browser Firefox 85.0, I can see in debug mode XHR NS_BINDING_ABORTED errors blocking ws.php POST requests, also visible in networks tab,
  • there are 2 others missing closing square brackets in batch_manager.js code.

My third workaround (#1296 (comment)) is to go back to my piwigo 2.10.2 to get this process running well.

@exekutive
Copy link
Contributor

you may want to discuss this in the Forum. You are kind of hidden here.
https://piwigo.org/forum/viewtopic.php?pid=179606#p179606

@7tonin
Copy link
Contributor Author

7tonin commented Feb 3, 2021

So I posted a new topic on the forum.
https://piwigo.org/forum/viewtopic.php?id=31001

@7tonin
Copy link
Contributor Author

7tonin commented Feb 6, 2021

The problem is now coming from my browser client profile. With a brand new profile, and with piwigo 11.3.0, the bug is gone.

@7tonin 7tonin closed this as completed Feb 6, 2021
@f00b4r0
Copy link

f00b4r0 commented Mar 5, 2023

Purely FYI, that bug is still there in 13.6.0, this issue should be reopened.
It affects Safari as well. The clumsy "workaround" described here for Firefox "works".
Would be nice if it actually worked out of the box, mass updating metadata is a small nightmare otherwise.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants