I'm getting a WSOD and this error whenever I try to access the settings page for this module, which makes the module unusable. I'm on Drupal 8.6.10.

The website encountered an unexpected error. Please try again later.

InvalidArgumentException: Source path  has to start with a slash. in Drupal\Core\Path\AliasManager->getAliasByPath() (line 186 of core/lib/Drupal/Core/Path/AliasManager.php). Drupal\splash_redirect\Form\SplashRedirectSettingsForm->buildForm(Array, Object)
call_user_func_array(Array, Array) (Line: 518)
Drupal\Core\Form\FormBuilder->retrieveForm('splash_redirect_settings_form', Object) (Line: 275)
Drupal\Core\Form\FormBuilder->buildForm('splash_redirect_settings_form', Object) (Line: 93)
Drupal\Core\Controller\FormController->getContentResult(Object, Object)
call_user_func_array(Array, Array) (Line: 123)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}() (Line: 582)
Drupal\Core\Render\Renderer->executeInRenderContext(Object, Object) (Line: 124)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->wrapControllerExecutionInRenderContext(Array, Array) (Line: 97)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}() (Line: 151)
Symfony\Component\HttpKernel\HttpKernel->handleRaw(Object, 1) (Line: 68)
Symfony\Component\HttpKernel\HttpKernel->handle(Object, 1, 1) (Line: 44)
Drupal\bat_api\StackMiddleware\BatApiMiddleware->handle(Object, 1, 1) (Line: 57)
Drupal\Core\StackMiddleware\Session->handle(Object, 1, 1) (Line: 47)
Drupal\Core\StackMiddleware\KernelPreHandle->handle(Object, 1, 1) (Line: 99)
Drupal\page_cache\StackMiddleware\PageCache->pass(Object, 1, 1) (Line: 78)
Drupal\page_cache\StackMiddleware\PageCache->handle(Object, 1, 1) (Line: 44)
Drupal\services\StackMiddleware\FormatSetter->handle(Object, 1, 1) (Line: 47)
Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle(Object, 1, 1) (Line: 52)
Drupal\Core\StackMiddleware\NegotiationMiddleware->handle(Object, 1, 1) (Line: 23)
Stack\StackedHttpKernel->handle(Object, 1, 1) (Line: 693)
Drupal\Core\DrupalKernel->handle(Object) (Line: 19)
CommentFileSizeAuthor
#6 splash_redirect_3041919.patch277 bytesadambernstein

Comments

carnerik created an issue. See original summary.

adambernstein’s picture

Did you happen to just update from Splash Redirect 8.x-1.4? If so, please run database updates as mentioned in the Release Notes

carnerik’s picture

Thanks for the fast reply!

It's a new install (8.x-1.5). I did run updates on the database (and cleared the cache).

I checked on simplytest.me (Drupal 8.6.13; Splash Redirect 8.x-1.5) and got the same result.

adambernstein’s picture

Assigned: Unassigned » adambernstein

Ok gotcha. Thanks for the report, I'll take a look.

  • AdamBernstein committed 409e1d2 on 8.x-1.x
    #3041919 add default config to avoid source field validation error
    
adambernstein’s picture

StatusFileSize
new277 bytes

Give this patch a try and let me know if it resolves the issue. You may have to uninstall and reinstall the splash_redirect module after patching.

adambernstein’s picture

Status: Active » Needs review

Haven't heard from OP, but I'm reasonably sure the patch will solve the issue. I'll bundle this into 8.x-1.6 and release. Make sure to uninstall splash_redirect before you update.

carnerik’s picture

Status: Needs review » Reviewed & tested by the community

It's working!

FYI, while examining the patch and module files for 1.5, I noticed that I was missing the config folder. I'm not sure when that happened... Anyway, I uninstalled the module, deleted the module folder, and then installed 1.6, just to be safe.

Thanks again for the fast response. I'm looking forward to trying the module out.

adambernstein’s picture

Status: Reviewed & tested by the community » Fixed

Great! Thanks for submitting the bug ticket, I'll close this out now.

The config folder was missing because it hadn't been added to the module yet :). That's exactly what I fixed in the patch, so no fault of yours. Thanks!

adambernstein’s picture

I just caught one other point of confusion that this may bring up. If you leave the default value of the source page as '/', one might expect that to be the front page (even though the help text says "leave blank"). I could imagine users thinking leaving the default '/' is the same as 'blank'.

The 8.x-1.7 release will handle this and interpret both true 'blank' and a single slash to be <front>.

Status: Fixed » Closed (fixed)

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