Attachments not being retitled in Zotero 7 when updating the file to match the name

edited September 8, 2023
In Zotero 7, when you right-click on a file and choose "Rename File from Parent Metadata", it doesn't update the whole thing. It shows that the file was renamed, but it doesn't update the title to match like Zotero has done in past versions. This leaves me with file attachments that are often titled with complete nonsense because whatever publisher created the PDFs generated filenames with what looks to me like random gibberish. Some of these original filenames can be misleading, too. Yet this is what the title comes in as when you import an attachment, and it seems you have manually type in something else if you want to clean that up--that's not how it used to work.

Plus, if I have more than one file attached to a document, it's not instantly clear which file goes with which attachment--you have to click on each one and look for the filename in the side pane.

I've been trying Zotero 7 but just rolled back to Zotero 6 because the messiness is aggravating, and I don't want to have to manually retitle the attachments to match what I happened automatically in version 6. Is there a setting to have the title update to match the filename, like it has worked in the past?
  • edited September 8, 2023
    If this is the way Zotero is designed to work, I would suggest (and I know I could be wrong) that most users would be least confused by simply defaulting to show the filename in the main pane instead of the title--which, as I mentioned above, is often complete gibberish when dragging and dropping a PDF directly into Zotero. Manually tidying up the titles so that they make sense is a waste of time as nearly none of the titles are actually useful (e.g., "Sage PDF" is not helpful to know which file is which on the disk, particularly with multiple attachments).

    I can see the logic for "Accepted Version," "Sage PDF," etc., but I think the informational value for most users would be higher for displaying the attachment filenames. I do realize that this would result in the attachment title appearing very similar to the bibliographic entry appearing directly under the parent item, but that would be more helpful for many people than "004825dfile.pdf" or "Sage PDF" or whatever other titles end up being generated depending on how PDFs are imported.
  • edited September 8, 2023
    Are you sure you have any "Sage PDF" as filename on the disk? Or is the attached file correctly renamed? Filename on the disk and name of the attachment in the main Zotero window are different things.

    For example, I have an attachment named "Full Text PDF" in the main window, but the name of the file on the disk is "Emmanuel(2005).pdf", because my template is {{ firstCreator suffix="(" }}{{ year suffix=")" }}
  • edited September 8, 2023
    Right, reading that link you sent, I realize they are different (thank you though!)—and that’s why I’m saying that, despite the huge list of improvements in 7 (and they are legion), I do not see this as an improvement over version 6. Actually it is the reverse for me. I would rather see in the middle pane the filename than a title that is different or, at worst, completely meaningless. In prior versions of Zotero, when you renamed the file, it would update the title to match—and, rather than losing useful information (e.g., losing the marginally useful title “Sage PDF”), the title was replaced with what I believe was *more useful* information, i.e., exactly what file this attachment was referring to. I realize both title and filename appear in the right pane, but I would rather have a tidy middle pane that instantly makes me aware of filenames so I can spot ones that I’m not happy with.
  • edited September 17, 2023
    I would rather have a tidy middle pane that instantly makes me aware of filenames so I can spot ones that I’m not happy with
    Why would you be unhappy with a filename? It's a template. Every single file will be renamed in exactly the same way. If you don't like the default format, you can change it in the settings and never think about it again.

    We're likely going to add an option to show filenames in the items list instead, but there's really no reason you should be worrying about filenames. Avoiding this sort of tedious task is the whole point of Zotero.

    And just to be clear, Zotero always auto-renamed files downloaded from the web, as long as it has existed. You've never needed to run Rename File from Parent Metadata on such a file. Maybe you've been running that unnecessarily on every single file you ever downloaded to Zotero, but by default you'll see the exact same thing you've always seen in the items list. The only difference is that we're no longer incorrectly throwing away the attachment title when using the manual rename option if the title doesn't already match the filename.
  • edited September 23, 2023
    @dstillman - Thank you for your reply. Here's an example.

    First, drag and drop a file called "viewcontent.pdf" into your library. This results in an attachment with an unhelpful name in your library and is what often happens when viewing a PDF directly in the browser and adding it through Zotero: metadata is often not found for the attachment, so it's just dropped into your library without a parent. You then discover it has no parent item, and so you go back and create the parent item directly. However, the attachment remains "viewcontent.pdf", and the attachment is displayed in the main window as "viewcontent.pdf". Right-clicking and "Rename File from Parent Metadata" renames the file on the disk but Zotero 7 leaves the item with this unhelpful attachment name.

    Under the rationale used in other discussions of this topic, it seems like this attachment title would be more usefully renamed "PDF Fulltext" or something like that, or else it would be retitled according to the filename, which was the point I was trying to make.

    Hope I'm making sense here as I'm not sure I have described the scenario correctly.
  • I'm curious to hear what would be the best practice to handle attachment titles. Should we leave them untouched (making Zotero's interface a lot messier, as noted by @internationaled), match them with the actual filename (risking that they go out of sync as soon as the parent item's metadata is modified), or what?

    Honestly, the use cases where they might be actually useful (i.e. submitted version) are so niche that most of the time they seem more like a hassle than a useful feature.
  • Right-clicking and "Rename File from Parent Metadata" renames the file on the disk but Zotero 7 leaves the item with this unhelpful attachment name.
    @internationaled: No it doesn't. We specifically changed this only for cases where the attachment title doesn't match the filename.
    else it would be retitled according to the filename, which was the point I was trying to make
    That's exactly what happens.
  • @mauriliomiceli: The best practice, as we advise it, is obviously to do nothing — we designed it to work in the way that we think results in the least clutter and unnecessary cognitive load. How is "Full-Text PDF" or "Submitted Version" — a short title that tells you exactly what kind of item it is — "messier" than a long filename unnecessarily repeating the metadata from the parent row?

    In any case, as we've said repeatedly, we plan to offer an option to show the filename instead of the attachment title for people who prefer that. We think that's pointless and distracting, but you'll be able to do whatever you want.
  • @dstillman - thank you for your reply. The problem is, more often than not PDFs and other attachments are dragged into Zotero from the filesystem, and they have meaningless filenames such as "viewcontent.pdf" (or similar gibberish) as the other user reported. Would you still recommend doing nothing to them? If so, what value would they bring, apart from polluting the interface with meaningless information?

    > No it doesn't. We specifically changed this only for cases where the attachment title doesn't match the filename.

    To be clear: what would be the intended behavior here? If I drag a PDF named "viewcontent.pdf" into Zotero, create a parent item, populate the parent item's metadata, and then click on "Rename File from Parent Metadata", only the filename is modified, but the title remains "viewcontent.pdf". I'm using the latest version of Zotero 7.
  • The problem is, more often than not PDFs and other attachments are dragged into Zotero from the filesystem
    I mean, doing that "more often than not" certainly isn't how Zotero is meant to be used. You're meant to save from the article page in your browser or, failing that, save from the PDF itself in your browser.

    But regardless, if you do add a PDF directly (either via the browser or from the filesystem) and either metadata is retrieved automatically or you create a parent item and run "Rename File from Parent Metadata", Zotero will rename the file and set the attachment title to the new filename, because, as I say above, it still changes the attachment title when it already matches the filename.

    It's possible we'll be changing it to set the attachment title to just "PDF" in these cases, since it doesn't really make sense to have the attachment title only sometimes match the renamed file.
    If I drag a PDF named "viewcontent.pdf" into Zotero, create a parent item, populate the parent item's metadata, and then click on "Rename File from Parent Metadata", only the filename is modified, but the title remains "viewcontent.pdf".
    That's certainly not intended behavior, and I can't reproduce it in 7.0.0-beta.40. If you drag in "viewcontent.pdf" (and it's not automatically recognized), you right-click and select Create Parent Item, you click Manual Entry, you fill in "Test" for the Title of the parent item, and you right-click on the attachment and select "Rename File from Parent Metadata", you should end up with a file named Test.pdf and an attachment with "Test.pdf" for the title. If that's not what you're seeing, disable all third-party plugins and try again, and if it's still happening, make a screen recording, upload it somewhere, and provide a link here or via email to support@zotero.org with a link to this thread.
  • @dstillman: Not sure if I'm doing anything wrong, but here's the video: https://streamable.com/3wba63
  • @dstillmann the video expired, I'm reuploading it in case you haven't seen it yet: https://streamable.com/jp6xox
  • @mauriliomiceli: Thanks — this was a Windows-specific bug. I've fixed this for the next beta.
  • edited October 8, 2023
    @dstillman: glad I could help. Then, since you said that it doesn't make sense to have the title only sometimes match the filename, would you recommend to manually set the title to "PDF" (or "Full Text PDF") when a PDF is dragged in from the filesystem?
Sign In or Register to comment.