We should be able to generate a preview without any connection to applenews setup.

Issue fork applenews-3029632

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

tbfisher created an issue. See original summary.

brianfisher’s picture

add preview link to widget

brianfisher’s picture

Status: Active » Needs review
brianfisher’s picture

fix

Uncaught PHP Exception Symfony\Component\Routing\Exception\InvalidParameterException: "Parameter "revision_id" for route "applenews.preview_download" must match "[^/]++" ("" given) to generate a corresponding URL." at core/lib/Drupal/Core/Routing/UrlGenerator.php line 204"

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

m4olivei’s picture

Assigned: Unassigned » m4olivei

This is a great idea!

I think patching it in as in #4, while it works, it exposes how cluttered this widget class is getting. I'm undertaking a bit of a cleanup. I'd also like to add some tests, which necessetates some refactoring. I've opened a MR in progress with the patch applied in the first commit and subsequent changes.

Will work on some tests next.

m4olivei’s picture

Some progress. Writing tests has already revealed gaps in the config schema 😬. Proving to be a worthwhile exercise. Also found bugs in my refactor or the widget code. Still need more tests against the fully configured state.

  • m4olivei committed 5f3a85c on 8.x-1.x
    Issue #3029632 by m4olivei, brianfisher: Add preview link when no...
m4olivei’s picture

Status: Needs review » Fixed

Yay! Tests pass. Lots of nice improvements here.

Status: Fixed » Closed (fixed)

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