When I enabled the module and tried to add new image style I get the following error with routing.

Symfony\Component\Routing\Exception\InvalidParameterException: Parameter "image_style" for route "retina_images.image.style_preview" must match "[^/]++" ("" given) to generate a corresponding URL. in Drupal\Core\Routing\UrlGenerator->doGenerate() (line 199 of core/lib/Drupal/Core/Routing/UrlGenerator.php).

There something wrong with image preview when adding new image style.

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

m.abdulqader created an issue. See original summary.

ohmdesbois’s picture

Same issue with Drupal 8.1.7

Uncaught PHP Exception Symfony\\Component\\Routing\\Exception\\InvalidParameterException: "Parameter "image_style" for route "retina_images.image.style_preview" must match "[^/]++" ("" given) to generate a corresponding URL." at /path_to_drupal/core/lib/Drupal/Core/Routing/UrlGenerator.php line 193,

kissfm’s picture

Hi. I have this trouble too. So, what did you do? Thanks!

christiansanders’s picture

Hi - I've attached a patch which will fix the issue around the routing name. Main issue was that there was a second period in the route name :)

christiansanders’s picture

Status: Active » Needs review
zaphoyd’s picture

Note that there are two issues here. One is the issue on the add image style page which was fixed by http://cgit.drupalcode.org/retina_images/commit/?id=20aa2a1f101e92dced5e... but hasn't made it to a release version. This fixes the issue in the title that prevents adding new image styles.

There is an additional problem that prevents the edit image style page from working because of the typo in the route name. The patch in #4 fixes the second issue for me (Drupal 8.4.4).

kbrinner’s picture

Thanks @zaphoyd - once I applied those 2 patches I was able to create a new image style.

If you get the following error after clicking the 'create new style' button on the subsequent pager:

Symfony\Component\Routing\Exception\RouteNotFoundException: Route "retina_images.image_style_preview" does not exist. in Drupal\Core\Routing\RouteProvider->getRouteByName() (line 201 of /app/core/lib/Drupal/Core/Routing/RouteProvider.php).

Just drush cr - the routing has changed so the cache needs to be rebuilt to reflect the change.

Drupal version 8.6.3
Retina version 8.x-1.0-beta1

nwom’s picture

Status: Needs review » Reviewed & tested by the community

Works for me. Thanks!

frankfarm’s picture

The patch in #4 resolved the problem for me as well.

astonvictor made their first commit to this issue’s fork.

astonvictor’s picture

Status: Reviewed & tested by the community » Fixed

thanks for the patch. fixed and merged

m.abdulqader’s picture

Status: Fixed » Closed (fixed)

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