Closed (fixed)
Project:
Drupal core
Version:
8.0.x-dev
Component:
image.module
Priority:
Major
Category:
Bug report
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
10 Jan 2013 at 23:12 UTC
Updated:
29 Jul 2014 at 21:45 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
swentel commentedTests pass locally for me as well.
Comment #3
aspilicious commentedFatal error: Call to a member function id() on a non-object in /var/lib/drupaltestbot/sites/default/files/checkout/core/modules/image/lib/Drupal/image/Tests/ImageAdminStylesTest.php on line 37
FATAL Drupal\image\Tests\ImageAdminStylesTest: test runner returned a non-zero error code (255).
Comment #4
tim.plunkettThe testbots run in a subdir (or with a prefix, I forget) and that throws url() off.
Comment #5
xjmCan we add an inline comment here explaining the subdirectory thing?
Comment #6
andypostI'm changing a path to image style in #1809376-4: Use EntityListController for image styles
So let's commit a proper patch
Comment #7
tim.plunkettNo, this doesn't make it any harder to do that conversion, it just means you have to change one line here.
Also, this is a current major bug in HEAD, that's a conversion.
Comment #8
sunHm. I don't see any other entity type that overrides the ::uri() method in this way. The existing are specifying a uri_callback.
Could we move that approach/idea of overriding ::uri() into a separate issue? I'd find it inconsistent if some entities in core are doing it this way and some are doing it in another way.
Essentially, just s/manage/edit/ + plus test assertion here?
That said, @andypost is right in that the patch *should* be /manage instead of /edit. So I think it would make sense to perform that change first.
Comment #9
tim.plunkettView::uri() does :)
And the rest should.
Comment #10
andypostAdded changes to fix urls from #1809376-4: Use EntityListController for image styles
Comment #11
andypostThis is not a part of patch :( It seems that we have no tests for registry
Comment #12
sunThanks, that makes a lot more sense.
The /edit path/suffix should actually be a MENU_DEFAULT_LOCAL_TASK; i.e., the path/to/%image_style itself should be the primary router path.
See contact_menu() for a reference implementation.
Comment #13
andypostThis a bit of out-scope but really makes sense
Comment #14
sunThank you!
Comment #15
webchickCommitted and pushed to 8.x. Thanks!
Comment #16
andypostNext clean-up #1809376-7: Use EntityListController for image styles