I found an inconsistency caused by the default block settings. By default if you view a webform block the 'pages_block' setting is set to 0 (Redirect to the node page after the first page). However, on the block settings page this is default set to 1 (Display all pages inside block). This means that if you do not save the block, it will do one thing, while when you save the block without touching the defaults on the settings page, it will do another thing. I believe it would be best to synchronise the defaults.

I am assuming that the most popular choice 1 (Display all pages inside block), at least it's what I would want to have by default, therefore the attached patch will change the hook_block_view implementation to set 'pages_block' to 1 by default.

I think in the future it would be nice to be able to set this option in the webform options, and possibly the default as well, but for now I'll leave it at this.

Related issues
#1308806: Webform as block not staying on page after validation errors
#1337784: Selecting "No redirect" does not reload current page.

CommentFileSizeAuthor
#1 pages_block_default-2158261-1.patch406 bytesdagomar

Comments

dagomar’s picture

StatusFileSize
new406 bytes
dagomar’s picture

Issue summary: View changes
dagomar’s picture

Status: Active » Needs review
quicksketch’s picture

Priority: Normal » Minor
Status: Needs review » Fixed

Thanks, I'm not sure how that got flipped around like that. Committed as-is to the 7.x-4.x branch. Thanks!

Status: Fixed » Closed (fixed)

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

fenstrat’s picture

Version: 7.x-4.x-dev » 8.x-4.x-dev
Assigned: Unassigned » fenstrat
Status: Closed (fixed) » Patch (to be ported)

Needs porting to 8.x-4.x.

fenstrat’s picture

Version: 8.x-4.x-dev » 7.x-4.x-dev
Assigned: fenstrat » Unassigned
Status: Patch (to be ported) » Fixed

Committed and pushed 51cf1c2 to 8.x-4.x. Thanks!

  • Commit ec4d6b4 on 8.x-4.x authored by dagomar, committed by fenstrat:
    Issue #2158261 by dagomar: Webform block redirects to page by default.
    

Status: Fixed » Closed (fixed)

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