Problem/Motivation

When visiting a non existing URL the following error shows up:
Error: Call to a member function getDefault() on null in Drupal\responsive_preview\ResponsivePreview->getPreviewUrl() (line 61 of modules/contrib/responsive_preview/src/ResponsivePreview.php).

Steps to reproduce

See above

Proposed resolution

Skip entirely

This should be covered by a test.

Remaining tasks

User interface changes

API changes

Data model changes

CommentFileSizeAuthor
#6 3592694-responsive_preview.patch2.16 KBdkmishra
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

anybody created an issue. See original summary.

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

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

dkmishra’s picture

Status: Active » Needs review
dkmishra’s picture

StatusFileSize
new2.16 KB

Here is the patch

jlj’s picture

Same issue, the patch works for me. Thanks.

anybody’s picture

Status: Needs review » Needs work

@dkmishra could you maybe add a test to ensure it will work in the future? For node add and node edit?

dkmishra’s picture

Hi @anybody, I have added node add coverage in testContentAdd(). Node edit was already covered by the existing testContentEdit() in the same.

anybody’s picture

Status: Needs work » Reviewed & tested by the community
Issue tags: -Needs tests

Thanks, LGTM!