Skip to content
This repository has been archived by the owner on Nov 30, 2022. It is now read-only.

Call to a member function getDomain() on null in Safari #1000

Closed
jackthedev opened this issue Oct 25, 2021 · 1 comment
Closed

Call to a member function getDomain() on null in Safari #1000

jackthedev opened this issue Oct 25, 2021 · 1 comment

Comments

@jackthedev
Copy link

jackthedev commented Oct 25, 2021

For bug reporting only! If you're posting a feature request or discussion, please ignore.

Expected Behavior

The app to work in safari.

Current Behavior

The app doesn't work when loading in safari.

Failure Information

I have seen another issue about safari which could be related?

#950

After authentication, the shop query string is stripped from the URL causing the error.

Steps to Reproduce

Please provide detailed steps for reproducing the issue.

  1. Fresh Laravel install
  2. Install Package
  3. Setup app
  4. Navigate to Safari
  5. App will fail to load and throw "Call to a member function getDomain() on null"

Context

Please provide any relevant information about your setup. This is important in case the issue is not reproducible except for under certain conditions.

  • Package Version: v17.1
  • Laravel Version: v8
  • PHP Version: v8
  • Using a toolset (Docker, Laradock, Vagrant, etc.):

Failure Logs

Please include any relevant log snippets or files here.

1

@jackthedev
Copy link
Author

jackthedev commented Oct 26, 2021

For anyone having the same issue here are the steps to fix it.

  • Make sure your main 'home' route doesn't redirect to another route (the shop parameter will be dropped on that redirect)
  • You need to apply a shop param to all of your routes etc..... route('home', ['shop' => auth()->user()->name])
  • A handy snippet I found when searching through past issues is this one provided by @andreuka . It uses JS to apply your shop param to all a tags, I would advise wrapping this in an auth()->check() also.
    V17 Billing Route Not Wokring  #872 (comment)

Hope this helps anyone with the same issue.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant