For some reason, Laravel does not parse " as expected in the footer of emails.
I am expecting to see an actual quote, but it's returning the HTML as-is.
I have tried overriding this using the toMailUsing in my AuthServiceProvider but this particular line doesn't seen to be editable.
Please advise on what I'm doing wrong.
Related
I'm trying to implement the KeeWeb HTML file to my Laravel project.
I've tried to just add it to a blade file (e.g. keeweb.blade.php) and then using return view('keeweb'); and I'm getting the following error: Parse error: syntax error, unexpected '=', expecting ',' or ')'
However, I've also opened the HTML file with my browser and it works fine, so it seems that Blade is parsing something it shouldn't be. Fine.
So next I tried to just make a test blade file, and in that just #include('keeweb') and then rename keeweb.blade.php to keeweb.php and I get the same.
So next I tried to simply return view('keeweb'); //keeweb.php with the same error.
I need to parse some sort of variable because I need to change the head of the document so I cannot just File::get()
You are right, there are multiple occurrences of {{ in that file which Blade is trying to parse out.
I don't think you want to rename it to have only .php extension though. Try keeping it keeweb.blade.php and when you include it, try the following...
#verbatim
include('keeweb')
#endverbatim
Or even placing the #verbatim and #endverbatim inside the actual keeweb file at the top and bottom respectively, then you should be able to include it just like any other blade file.
I am trying to send a get request through an MVC form but when I get the value in the controller using RequestParam somehow the HTML tags like <li> etc are getting filtered, any suggestion so as where these tags are getting filtered and any workarounds for them.
Thanks.
You can try using some URL Encoding like this %3Cli%3E%3C%2Fli%3E . If this is not working, you can try a hardcode encoding when sending and decoding when receiving. For example replace "<" with "|OPEN_BRACKET|" and ">" with "|CLOSE_BRACKET|" . Keep in mind, that this is a bad solution and use it as a last resort. Also make some checks for XSS attacks.
I have a form to update some profile information. After making changes when the user clicks on the submit button my to be redirected to the profile page.
so after inserting the updated information into database I have the following code to redirect to the profile page:
database query goes here...
redirect('studentprofile/get/$id');
Here the $id is the the profile id and "get" is the function and "studentprofile" is the controller. But this is not working at all. It seems like the "redirect" is not getting the value of $id.
When the user submits data it shows an error saying "The URI you submitted has disallowed characters." and the URL looks like this
http://localhost/sundial/studentprofile/get/$id
would you please kindly tell me what is wrong with my script? Just for your information I am using Codeigniter
Thanks in advance :)
You need the redirect path string to be in double quotes:
redirect("studentprofile/get/$id");
or write it like this:
redirect('studentprofile/get/'.$id);
You are using single quotes use single quotes instead and btw that is not an issue of CodeIgnitor. Read more about strings: http://www.php.net/manual/de/language.types.string.php#language.types.string.syntax.double
I am a beginner learning codeigniter to build a website. For authentication feature, i use tank_auth library and it works fine if I dont alter the tank_auth table field names.
Then, to combine the tank_auth's 'users' table with my existing 'users_info' table, I modified the field names 'new_email_key' and 'username' as NewEmailKey and UserName respectively.
The above specified field name changes were done in libraries\Tank_auth.php, models\tank_auth\users.php and controllers\auth.php files.
In the database, the submitted data are stored right in the table. But in the activation email received, i am getting the following errors:
Message: Undefined variable: username
Filename: email/activate-html.php
Message: Undefined variable: new_email_key
Filename: email/activate-html.php
Is it safe to use the tank_auth table field names as it is in our CI projects?
Is there any clear documentation written on how to customize and use the tank_auth 'users' table field names?
I am stuck with these error messages as i dont figure out where else the field names need to be altered in tank_auth.
Any help appreciated.
These errors you are listing are simple "undefined variable" errors, like it says, I'm not sure what is confusing here.
Have you looked at the mailing function? Or googled the error meaning? Tank Auth's mail uses an array for sending mail.
$data['username'] = "Bob";
$data['new_email_key'] = "1249ufasiojlk215ifasdy243jhaslkjhasjkghasd";
mail_function_name($data)
that data is passed to the mail function which uses the /email/activate-html.php view/template.
I don't believe there is Tank_Auth modification documentation as the PHP is VERY straight forward, and well commented, if you are having trouble with it, it means you don't understand the code, and the fault lies in your ability to understand WHAT is being done in the code, not in the documentation of TankAuth. Documentation won't really save you here.
Learn what the errors are (ie, undefined variable) and try to fix them one by one.
Since Tank_auth's documentation does not seem to mention config setting for this,
sending such an error message is unexpected and may be taken as a bug.
In my magento website As soon as someone places order , an email is sent to his/her emailid. In the email the subject is correct but there is no body in the message, i mean the message comes blank.
i added new template from Transactional Emails section and associated this template with the Order from configuration->sales emails. but still my subject of the template reaches to mails but not the body. the message body remains empty always.
please help me solve this issue
thanks in advance
Looks like there is some error during rendering the email template. Try to replace your email template body with something simple.
Magento doesn't trigger any error when the template is not returned/processed properly.
The trace is:
Mage/Sales/Model/Order.php - sendNewOrderEmail()
Mage/Core/Model/Email/Template/Mailer.php - send()
Mage/Core/Model/Template.php - send()
Some things to check first - is the email valid for send, see the conditions below:
public function isValidForSend()
{
return !Mage::getStoreConfigFlag('system/smtp/disable')
&& $this->getSenderName()
&& $this->getSenderEmail()
&& $this->getTemplateSubject();
}
Another thing to look for:
If you copy-pasted some of the email content you might have some characters in the email that are not ASCII. This causes a crash when the template is parsed and there is no error logged/displayed.
This can be checked by using the standard Magento email template and if that works and your custom template doesn't.
I found that the cause of the error was the vars:
{{config path='trans_email/ident_support/email'}}
{{config path='general/store_information/phone'}}
If these are deleted/substituted, then the emails are being sent without errors.