Author Topic: Run into what I think is a bug  (Read 4083 times)

Offline schlotz

  • Member
  • **
  • Posts: 63
    • View Profile
Run into what I think is a bug
« on: August 29, 2020, 06:33:24 AM »
This is the coding I have in the Location section:  \{evnt:0,3}#2\    Event section contains: LOUvIND
I call {loc} in the image content section but the result  simply prints out as:  \{evnt:0,3}#2\  instead of picking up the code replacement which should have been:  Lynn Family Stadium

This appears to be an issue with spaces in code replacements specifically tied to the 'location' section. Code replacements with other fields that contain spaces are working properly. I spend a number of hours analyzing my code replacement text file, and found nothing out of place that could be creating the error.  Finally found a work around by putting the code into the Supp Cat 1 down in the Status section then calling it via {sup1} in Image content. Definitely an issue worth looking into?

Matt

Offline Kirk Baker

  • Senior Software Engineer
  • Camera Bits Staff
  • Superhero Member
  • *****
  • Posts: 24730
    • View Profile
    • Camera Bits, Inc.
Re: Run into what I think is a bug
« Reply #1 on: August 29, 2020, 08:57:34 AM »
Matt,

This is the coding I have in the Location section:  \{evnt:0,3}#2\    Event section contains: LOUvIND
I call {loc} in the image content section but the result  simply prints out as:  \{evnt:0,3}#2\  instead of picking up the code replacement which should have been:  Lynn Family Stadium

This appears to be an issue with spaces in code replacements specifically tied to the 'location' section. Code replacements with other fields that contain spaces are working properly. I spend a number of hours analyzing my code replacement text file, and found nothing out of place that could be creating the error.  Finally found a work around by putting the code into the Supp Cat 1 down in the Status section then calling it via {sup1} in Image content. Definitely an issue worth looking into?

Spaces shouldn't matter.  Please post your code replacement text file.  Use the 'Attachments and other options' link when you're composing your reply to this message and there you'll be able to upload your file.

Thanks,

-Kirk

Offline schlotz

  • Member
  • **
  • Posts: 63
    • View Profile
Re: Run into what I think is a bug
« Reply #2 on: September 01, 2020, 04:50:36 AM »
here is code replacement file I'm using


Offline Kirk Baker

  • Senior Software Engineer
  • Camera Bits Staff
  • Superhero Member
  • *****
  • Posts: 24730
    • View Profile
    • Camera Bits, Inc.
Re: Run into what I think is a bug
« Reply #3 on: September 01, 2020, 10:00:23 AM »
here is code replacement file I'm using

Thanks for the file.  It has a number of inconsistencies in regards to line endings, lines consisting of nothing but tabs, etc.  I have corrected the text file and it is attached.  Your example works fine for me.  I put "LOUvIND" in the "Event" field and then entered ={evnt:0,3}#2= in another field, then held down the Option key and clicked the "Eval" button and it was replaced with "Lynn Family Stadium" which is the second replacement for "LOU".

Note, "=" is my Code Replacement delimiter character.

HTH,

-Kirk

Offline schlotz

  • Member
  • **
  • Posts: 63
    • View Profile
Re: Run into what I think is a bug
« Reply #4 on: September 02, 2020, 02:37:31 PM »
Interesting.  I loaded your revised txt file, brought up PM, reset the metadata template to call for {loc},  then applied the template to an image. Unfortunately I got the exact same results as I was before. Attached is a screen shot of that section when I selected the "i" on the photo.

Attached is the screen shot of end result and one of the template section.

Offline Kirk Baker

  • Senior Software Engineer
  • Camera Bits Staff
  • Superhero Member
  • *****
  • Posts: 24730
    • View Profile
    • Camera Bits, Inc.
Re: Run into what I think is a bug
« Reply #5 on: September 02, 2020, 03:03:37 PM »
Interesting.  I loaded your revised txt file, brought up PM, reset the metadata template to call for {loc},  then applied the template to an image. Unfortunately I got the exact same results as I was before. Attached is a screen shot of that section when I selected the "i" on the photo.

Attached is the screen shot of end result and one of the template section.

Can you post screenshots that show all of the pertinent fields, please?

Thanks,

-Kirk

Offline schlotz

  • Member
  • **
  • Posts: 63
    • View Profile
Re: Run into what I think is a bug
« Reply #6 on: September 03, 2020, 04:57:51 AM »
Sure can.  Here is both the template and the result.

Offline Kirk Baker

  • Senior Software Engineer
  • Camera Bits Staff
  • Superhero Member
  • *****
  • Posts: 24730
    • View Profile
    • Camera Bits, Inc.
Re: Run into what I think is a bug
« Reply #7 on: September 03, 2020, 07:11:36 AM »
Sure can.  Here is both the template and the result.

Thanks.  While I suppose it could be seen as a bug, code replacement and metadata template application processes fields in a particular order and the "Caption" field is being processed before "Event" and "Location" so at the time of the work being done in "Caption" the "Location" field hasn't had its code replacement completed, so the variable for it is the unprocessed string "\{evnt:0,3}#2\"

If you instead replace {loc} in your "Caption" field with the same code replacement, I expect that everything will work.

-Kirk

Offline schlotz

  • Member
  • **
  • Posts: 63
    • View Profile
Re: Run into what I think is a bug
« Reply #8 on: September 03, 2020, 11:55:48 AM »
Tried it and it works so it's a solution. Of course my original workaround works as well.  Funny that all the other coding works and without error.  Very odd it's only the location field that has a hiccup.  Given the other coding works without an issue, I'm still thinking there is a software issue to be addressed.