Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Failing to access webform when not logged in #1850

Open
aldoemir opened this issue Dec 18, 2024 · 0 comments
Open

Failing to access webform when not logged in #1850

aldoemir opened this issue Dec 18, 2024 · 0 comments
Assignees

Comments

@aldoemir
Copy link

aldoemir commented Dec 18, 2024

Bug report

Issue Description

When accessing the webform the AttributeRepository fails to read the current user since there are no users logged in.

Preconditions

Please provide as detailed information about your environment as possible.

1. Have a webform

Steps to reproduce

It is important to provide a set of clear steps to reproduce this bug.If relevant please include code samples.

1. Create a webform
2. Share the link
3. Try to access the link via incognito tab

Expected result

Access the webform normally

Actual result

AttributeRepository throws an error

Logs

Message:

Attempt to read property "view_permission" on null (View: /.../packages/Webkul/WebForm/src/resources/views/settings/web-forms/controls.blade.php) (View: /.../packages/Webkul/WebForm/src/resources/views/settings/web-forms/controls.blade.php)

Offender file:

if ($currentUser->view_permission === 'group') {

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

No branches or pull requests

3 participants