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

Undefined variable $exception when I added variable to Mail construct #224

Open
xMrViktorx opened this issue Jan 14, 2023 · 6 comments
Open
Labels
bug Something isn't working Review Needed testing v5 version 5, supports both API and self hosted

Comments

@xMrViktorx
Copy link

xMrViktorx commented Jan 14, 2023

maileclipse/mailables/view/Testmail page.

Without variable, everything is okey, but If I add variable to __construct I get this error:
image

I gone deeper and this is because when you add variable to construct, the view is null, and without view It can't render the preview.

$reflector->newInstanceArgs($resolvedTypeHints) doesn't give back view.

image

Reproduce the bug

  1. Create a mailable
  2. Create a template
  3. In the created mailable file add variable to construct
  4. In the created mailable set the view insside the build function: return $this->view('mailTemplate');

Laravel Framework 8.42.1
MailEclipse v4.0.3

@xMrViktorx xMrViktorx added bug Something isn't working Review Needed labels Jan 14, 2023
@elguitarraverde
Copy link

@xMrViktorx try remove $order from the constructor.

/**
* Create a new message instance.
*
* @return void
*/
public $order;
public function __construct()
{
}

@ReeceM
Copy link
Collaborator

ReeceM commented Feb 13, 2023

Hi @xMrViktorx

I think the section of the code that is supposed to make use of the new laravel Mail class style and still use the old one is possibly causing this problem.

Sorry for the delay in response on this issue and a few others, I have to give priority to some other matters.

@meet-7span
Copy link

@ReeceM Any update on this? cause I'm also facing the same issue. I can't edit the template.

@ReeceM
Copy link
Collaborator

ReeceM commented Jul 9, 2023

So it would be great if you can share a error message / trace. Also as mentioned earlier in the messages, I currently have a few things that need to be given priority. But I am happy to have a look, or if you would like to make a PR those are welcome.

@meet-7span
Copy link

meet-7span commented Jul 10, 2023

@ReeceM

image

When creating a new template, it is work fine. However, if you make the template content dynamic and need to pass data to the mailable class constructor, you may encounter an error on the Eclips list page.

@Qoraiche Qoraiche added v5 version 5, supports both API and self hosted testing labels Aug 2, 2023
@meet-7span
Copy link

@ReeceM

we have tried with the below command but getting the same issue

to install on laravel 10,

composer require qoraiche/laravel-mail-editor:dev-master
or

composer require qoraiche/laravel-mail-editor:4.1.0-beta.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working Review Needed testing v5 version 5, supports both API and self hosted
Projects
None yet
Development

No branches or pull requests

5 participants