Tips666
Monday, April 4, 2016
Wednesday, January 28, 2015
Symfony2 with Sonata Admin:
How to translate in Sonata Admin:
- You don't need $this->trans
- Create a directory "translations" in your bundle directory
src/TestBundle/Resources
- add a file
AcmeTestBundle.zh_CN.yml
app/config/config.yml - default_locale: "zh_CN"
- In its content translate it like below:
Name: 名字
Activated: 活性
Children: 孩子
Sunday, February 26, 2012
Drupal : Notice: Undefined index: Return-Path in DefaultMailSystem->mail()
Notice: Undefined index: Return-Path in DefaultMailSystem->mail() (line 101 of C:\xampp\htdocs\Drupal\sis\modules\system\system.mail.inc).
Solution :
-----------------------------------------------------------------------------------
You have problem on "site_mail" row in variable table. Maybe you change its value.
This is site_mail row: |'site_mail' |'s:20:\"emsiemhong@gmail.com\";'|
For more information go to link below:
https://drupal.org/node/131737
-----------------------------------------------------------------------------------
Solution :
-----------------------------------------------------------------------------------
You have problem on "site_mail" row in variable table. Maybe you change its value.
This is site_mail row: |'site_mail' |'s:20:\"emsiemhong@gmail.com\";'|
For more information go to link below:
https://drupal.org/node/131737
-----------------------------------------------------------------------------------
Drupal : Warning: implode() [function.implode]: Invalid arguments passed in DefaultMailSystem->format()....
Warning: implode() [function.implode]: Invalid arguments passed in
DefaultMailSystem->format() (line 23 of C:\xampp\htdocs\Drupal\sis\modules\
system\system.mail.inc).
Solution:
-------------------------------------------------------------------------
DefaultMailSystem->format() (line 23 of C:\xampp\htdocs\Drupal\sis\modules\
system\system.mail.inc).
Solution:
-------------------------------------------------------------------------
DefaultMailSystem->format() expects the message body to be an array.
Currently, the message body is given as a string.
-------------------------------------------------------------------------
Saturday, February 25, 2012
Drupal 7: Call function from another module different from the .module file
Should be load the module first before call the function :
module_load_include($type, $module, $name = NULL);
-----------------------------------------------------------------
Example:
<?php
// Load node.admin.inc from the node module
module_load_include('inc', 'node', 'node.admin');
?>
---------------------------------------------------
module_load_include($type, $module, $name = NULL);
-----------------------------------------------------------------
Example:
<?php
// Load node.admin.inc from the node module
module_load_include('inc', 'node', 'node.admin');
?>
---------------------------------------------------
Drupal 7: Strict warning: Only variables should be passed by.....
Drupal 7: Strict warning: Only variables should be passed by reference in
order_example_info_page() (line 33 of C:\xampp\htdocs\Drupal\
commerce_kickstart\sites\all\modules\commerce_examples\order_example\
order_example.module).
------------------------------------------------------------------------------------
Example block code:
function order_example_info_page() {
$output = drupal_render(drupal_get_form('order_example_form'));
return $output;
}
Change to:
function order_example_info_page() {
$form = drupal_get_form('order_example_form');
$output = drupal_render($form);
return $output;
}
-------------------------------------------------------------------------------------
order_example_info_page() (line 33 of C:\xampp\htdocs\Drupal\
commerce_kickstart\sites\all\modules\commerce_examples\order_example\
order_example.module).
------------------------------------------------------------------------------------
Example block code:
function order_example_info_page() {
$output = drupal_render(drupal_get_form('order_example_form'));
return $output;
}
Change to:
function order_example_info_page() {
$form = drupal_get_form('order_example_form');
$output = drupal_render($form);
return $output;
}
-------------------------------------------------------------------------------------
Subscribe to:
Posts (Atom)