Hello Nathaniel,

Sorry, it's me again lol.
My site has been doing well since I updated the module to version 6.0.x.
However, I found 3 improvable items which could let it even more perfect but have no ideas yet.

1) It's great that the photo is fieldable now, but users have to modify the fields on the editing page. They couldn't do so when uploading photos (/node/*/photos). I was wondering if we could simply add fields on that page? (I don't use Plupload in order to let them input the title and description.)
If a twig page is needed, could you let me know how to correctly name it?

2) It would be cool if we let the photo list (on /admin/content/photos) selectable, like the image attached.

3) Is there a way to remove the rearrange tab on the album page (which links to /node/302/photos-rearrange/)?

Much appreciated!

Issue fork photos-3211968

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

kingto created an issue. See original summary.

kingto’s picture

StatusFileSize
new32.95 KB

Attachment for your review.

kingto’s picture

Issue summary: View changes
kingto’s picture

Issue summary: View changes
nathaniel’s picture

Thanks for the feedback!

1. There is the /photos/image/add page. We could probably add an option to display that form (or another form display) on the /node/*/photos page and select the album automatically, but I think it would be limited to one at a time for now. (This will require some coding.)

2. I think you can make them selectable with the vbo (views_bulk_operations) module. Enable/edit the view: /admin/structure/views/view/photos

3. You would need a custom module. With something like this to remove the rearrange tab:

/**
 * Implements hook_local_tasks_alter().
 */
function MODULENAME_local_tasks_alter(&$local_tasks) {
  unset($local_tasks['photos.node.rearrange']);
}
kingto’s picture

Very illuminating!

I believe /photos/image/add greatly meets my need. "Album ID" could be added into its form display, then we input the album title to select the matched album.

The only known issue on that form is the EXIF values losing if an image larger than the max resolution limit for the field_image.
It doesn't happen on /node/*/photos form, which is an awesome feature.

Besides, the last two issues have been fixed, thank you so much!!!

  • 468c8dd committed on 6.0.x
    Issue #3211968 by kingto, Nathaniel: Add option to use entity form on...
nathaniel’s picture

Status: Active » Needs review

Added an option to use the entity form on the node/*/photos page.

/admin/config/media/photos (if the form gives an error, try clearing cache).

I'm not sure about the EXIF issue, I'll open a separate issue to track that.

nathaniel’s picture

Category: Support request » Feature request
kingto’s picture

Cool, you did it!

I find that option and have opened it. The entity form works great as expected.

However, the submitted image is not showing on the album, then I go to /admin/content/photos and find the following error:

Uncaught PHP Exception Symfony\Component\Routing\Exception\InvalidParameterException: "Parameter "node" for route "entity.photos_image.canonical" must match "\d+" ("" given) to generate a corresponding URL." at /home/user/public_html/core/lib/Drupal/Core/Routing/UrlGenerator.php line 204

I did some research and found it probably caused by an unsaved/pre_save node with no ID or something.
I was assuming we might need to add "\d+" to somewhere.

Thank you!!

nathaniel’s picture

Sounds like maybe the album id wasn't saved. Is it hidden or disabled on the form display?

kingto’s picture

That makes sense. I recall it was disabled when I was having the first try.
I'll have another try on my mirror site :)
Thanks!

---
Update: tested okay!!!

Rinku Jacob 13 made their first commit to this issue’s fork.

kingto’s picture

Status: Needs review » Fixed
StatusFileSize
new952.23 KB
new532.5 KB
new1.2 MB

Issue fixed.
Just attached 3 screenshots of my site where deployed with this great module.
Thanks Nathaniel!

nathaniel’s picture

Very nice! Thanks for helping make the module better!

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.