[Bug] "Rename file from parent metadata" not working for attached pdfs

Hi, congrats for the new look & feel.Looks great and loving the the new, albeit not massive changed, UX.Also the new epub and annotation capabilities in the documents seem promising.

Just to note that the file renaming function has stopped working as of version 7.It worked ok on the previous one, but since the update even if I right click and order it the file doesn't change and keeps as "PDF" in capital letters.I attach an example:

188BET靠谱吗https://s3.amazonaws.com/zotero.org/images/forums/u10294532/ce28yzmiygu3jh5a9gok.png

As the system doesn't produce any error per se, I can't report an error code through the system.

Thanks

System specs:
Ubuntu 20.04 LTS
Intel Core i7-8565U
RAM 16Gb
Intel UHD graphics 620
Kernel 6.8.0-40-generic
64 bits
188BET靠谱吗Zotero: 7.0
  • 188BET靠谱吗//www.brodersterzo.com/support/file_renaming#attachment_title_vs_filename

    Files were always being automatically renamed - you never needed to manually right-click and Rename File from Parent Metadata unless you changed the parent item.188BET靠谱吗A bug in previous versions of Zotero caused the attachment title, which is different from the filename, to be changed as well!188BET靠谱吗that's fixed in Zotero 7.
  • Thanks for the reply.Then the feature isn't working.188BET靠谱吗Zotero 7 is not renaming files automatically nor manually:

    188BET靠谱吗https://s3.amazonaws.com/zotero.org/images/forums/u10294532/38pji7n78ofcnsiz0b76.png

    They stay like this
  • Update.In the process of right clicking and requesting for the 'Rename...' I saw the message poping in the bottom right corner indicating it had done as requested.Wondering, I decided to check the actual naming on the pdf in the file and voilá:

    188BET靠谱吗https://s3.amazonaws.com/zotero.org/images/forums/u10294532/4uhfkmi63sf4mt76waza.png

    188BET靠谱吗Zotero is changing the name of the file, but not displaying it correctly as the image shows.

    Thanks for the amazing work.
  • It's working correctly.Read the linked page.
  • I am having the same problem with unexpected attachment titles.

    I don't understand what the benefit of attachment titles not being the filename.Or at least, it should be an option that they are.

    I actually new that the automatic file renaming was working in previous versions.The reason why I still clicked on "Rename File from Parent Metadata" was precisely because it gave me a nicer title.That option seems to be gone now as well.

    As for the provided link, if I understand it correctly, one would have to run the JavaScript every time a new attachment is added.So, that doesn't seem like a reasonable solution either.
  • I don't understand what the benefit of attachment titles not being the filename.
    The benefits are explained on the linked page.
    if I understand it correctly, one would have to run the JavaScript every time a new attachment is added
    No, the JavaScript updates existing attachments with titles matching the filename to use the simpler titles.
  • Thanks for your quick reply.

    I have read the linked page again.I did not find it easy to understand.But if I understand it correctly the benefit is:

    "These separate titles avoid cluttering the items list with duplicate metadata and prevent parent items from being unnecessarily expanded when searching for titles or creators."

    However, the feature was different previously.I know the page says that this was a bug.188BET靠谱吗But there seems to be no way to fix the PDFs that have been added previously in Zotero.

    The page also states:

    "Subsequent files added to an item from the filesystem will still get titles named after the filename (without the file extension), since those are likely to be supplementary files and the filename may be informative."

    But this seems highly confusing because previously files names this way were exactly not supplementary but the major attachment.

    Finally, maybe reword at least the instruction on how to rename:

    "You can view and change the title and filename by clicking on the attachment and looking in the item pane."

    I guess there is nothing renamed by clicking and looking.Instead, one has to also click on the title or filename in the item pane.Maybe that is obvious but it wasn't for me.

    188BET靠谱吗Anyway, thanks for all the work on Zotero!I am sure most of it has been improved in version 7 due to it.
  • edited 2 days ago
    I know the page says that this was a bug.188BET靠谱吗But there seems to be no way to fix the PDFs that have been added previously in Zotero.
    That's exactly what the code in the linked section does.It will change titles named after the filename to simpler, less-distracting, less-redundant titles like "PDF", in line with current behavior.(We'll be moving that code to a menu option in an upcoming update.)
  • Ok.Got it.I'll just get used to this no problem.Thanks!
  • Sorry for being slow but it is still a bit confusing to me.

    I am still a little afraid to run the script.For example, I have many books where I meticulously named attached PDFs such that they correspond to chapter titles (but also include the book title since that seemed to be the previous default).I find that very helpful in order to distinguish them.The description of the script sounds as if it will rename all my files.So, probably I should not run the script, right?

    Also, what is the important difference between dragging a file and importing it via the browser that justifies different ways in which the attachments are named?
  • @daniel.r: As written, it will only re-title attachments where the title ends in ".pdf".
    Also, what is the important difference between dragging a file and importing it via the browser that justifies different ways in which the attachments are named?
    188BET靠谱吗When you save from the web, Zotero knows what's being saved, so it can provide more context for what the file is — conveying, say, that this is the canonical PDF from the publisher, or that this is a submitted (but not officially published) open-access copy.

    When you drag a file from the filesystem, all we have is the filename.

    188BET靠谱吗But Zotero 7 uses "PDF" for the latter case to bring it closer to the simpler, less-redundant titles of attachments saved from the web.
  • Okay, thanks for clarifying.Then I should really not use the script.188BET靠谱吗Since what I did was use the title that Zotero (<7) automatically suggested, i.e.with ".pdf", and add the name of the chapter to it.
  • edited yesterday at 11:05am
    188BET靠谱吗Note that the cleaner way to do this in Zotero 7 would be to use just chapter titles for the attachment titles (as Zotero should generally do automatically if you save them from the web on a supported site) and then configure a custom filename formatthat conditionally used the attachmentTitlevariable for secondary files (e.g., files that weren't just "PDF"), which could incorporate the book metadata.

    This will particularly pay off once we add continuous renaming to keep filenames in sync as metadata is edited, which we're hoping to do soon.
  • I see.

    Here is another thing that I was confused about.The page states:

    "These separate titles avoid cluttering the items list with duplicate metadata and prevent parent items from being unnecessarily expanded when searching for titles or creators."

    First, I couldn't reproduce the problem about unnecessarily expanded items.But this was because I used the "Title, Creator, Year" entry from the quick search menu.Only now, I realized that when searching for "Title" (I still cannot reproduce with "Creator") using the "Advanced Search" that it shows attachments.It seems a little strange that there is this difference...
  • edited yesterday at 11:26am
    "Title, Creator, Year" specifically searches only parent items.

    "All Fields & Tags" and the advanced-search conditions will match any item, so that's where you'll see this problem.
Sign Inor Registerto comment.