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

Placeholders work still outstanding #436

Open
8 of 9 tasks
acabal opened this issue Dec 14, 2024 · 1 comment
Open
8 of 9 tasks

Placeholders work still outstanding #436

acabal opened this issue Dec 14, 2024 · 1 comment
Assignees

Comments

@acabal
Copy link
Member

acabal commented Dec 14, 2024

I'm centralizing everything here so we can track it better.

I just went through and cleaned up the remaining PHPStan errors.

This is what's left, in order or highest priority to lowest:

  • Mobile placeholder outlines are too big
  • Authors who have only placeholder works end up at a 404. For example The Maltese Falcon works but Dashiell Hammet 404s. We should return a page listing all the placeholders.
  • Quick fix: In the EbookPlaceholderForm.php template, there are several <fieldset>s that only have a single child <label>. We should restructure that to remove those <fieldset>s as that doesn't make semantic sense. For example line 79, line 105, line 130 etc.
  • Add a dropdown to specify series type for collections when adding a new placeholder
  • Form to update placeholders
  • Form to delete placeholders (this has already occurred, a placeholder for a short story was added by mistake)
  • Update the wanted list to use placeholders from DB
  • When we release an ebook that deletes a placeholder, what happens if the collection info for the actual ebook differs from the placeholder's collection info?
  • Fixing remaining PHPStan errors
@colagrosso
Copy link
Collaborator

Thanks for the prioritized list and all your recent fixes, too!

I'm going to mark this one as fixed:

When we release an ebook that deletes a placeholder, what happens if the collection info for the actual ebook differs from the placeholder's collection info?

These two lines in Ebook::Save() do the right thing:

web/lib/Ebook.php

Lines 1820 to 1821 in 5782d6c

$this->RemoveCollectionMemberships();
$this->AddCollectionMemberships();

That is, they remove all the previous placeholder collections and add the collections from the actual produced Ebook. I tested this by

  • Deleting an existing ebook
  • Creating a placeholder with the same author and title so that it would have the same identifier, adding some bogus collections to the placeholder
  • Rerunning scripts/update-ebook-database on the actual ebook

The bogus collections from the placeholder where gone, and the collections from content.opf were present.

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

2 participants