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

Fatal error encountered when sending a "Forgot Password" email #183

Open
siddhantprateek opened this issue Aug 20, 2024 · 7 comments
Open

Comments

@siddhantprateek
Copy link

I'm using the vvveb Docker image, and when the application is running, I encounter an error while trying to send a "Forgot Password" email.

Steps to Reproduce:

  1. Run the vvveb application using the Docker image.
  2. Navigate to the "Forgot Password" page.
  3. Attempt to send a password reset email.
  4. Observe the error.

Error Message:

Fatal error: Cannot use isset() on the result of an expression 
(you can use "null !== expression" instead) 
in /var/www/vvveb/storage/compiled-templates/admin_1_default_email_user_reset.html on line 330

Expected Behavior:

The password reset email should be sent successfully without any errors.

Actual Behavior:

A fatal error occurs, preventing the email from being sent.


The temporary fix that i'm doing is, updating compiled-templates/admin_1_default_email_user_reset.html by replacing

<span data-v-site-description-title><?php if (isset($this->site-description-title)) echo htmlentities($this->site-description-title); ?></span>

to

<span data-v-site-description-title><?php if (isset($this->{"site-description-title"})) { echo htmlentities($this->{"site-description-title"}); } ?></span>

<span data-v-site-address><?php if (isset($this->site-address)) echo htmlentities($this->site-address); ?></span>

to

<span data-v-site-address><?php if (isset($this->{"site-address"})) { echo htmlentities($this->{"site-address"}); } ?></span>
@givanz
Copy link
Owner

givanz commented Aug 20, 2024

Thank you for the bug report, it's fixed in the latest.zip update.

The site component was not included in the reset.html email template.

@siddhantprateek
Copy link
Author

image

i don't think its fixed yet, i ran into this issue

@givanz
Copy link
Owner

givanz commented Aug 21, 2024

I thinks this is related to missing site title/description.

@siddhantprateek
Copy link
Author

Thanks for the help! 🙂 The issue is resolved after making that addition, but I'll be in trouble if I self-host it, and haven't set any language or title in my initial login.

@givanz
Copy link
Owner

givanz commented Aug 21, 2024

Can you please provide more details on how to reproduce this bug and avoid setting the website title?

Default language and site title is required at install.

install

@siddhantprateek
Copy link
Author

This is how you can reproduce it:

After completing the initial setup (where I add the primary language and website name),
the issue appears when I try to reset the password on my next visit if I haven't set the localization language and site title.

@givanz
Copy link
Owner

givanz commented Aug 21, 2024

when I try to reset the password on my next visit if I haven't set the localization language and site title.

Language and site tile set on install will remain unless they are changed from admin, you don't need to set them again after admin login.

I tried to reset admin password right after install and I don't get any php error, I also tried to login and logout and then reset again.

Is there an additional step that I should do before password reset to generate the error?

Tried with a new docker image.

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

No branches or pull requests

2 participants