Meetup CiviCRM le mercredi 29 mai 2013, de 18h30 à 20h, dans les bureaux de Koumbit.org.
Svp prendre 1 minute pour vous inscrire, pour prévoir suffisamment de place.
Meetup CiviCRM le mercredi 29 mai 2013, de 18h30 à 20h, dans les bureaux de Koumbit.org.
Svp prendre 1 minute pour vous inscrire, pour prévoir suffisamment de place.
The slides for my presentation on internationalisation and localisation are available on the CiviCon SF 2013 website.
If you write your own CiviCRM extensions, you probably have custom forms.
In CiviCRM 4.2 and previous, you could show help icons in the following way:
<div class="helpicon">
<span id="mymodule-myfield-help" style="display:none">
<div class="crm-help">Help text here.</div>
</span>
</div>
This shows a small help icon, and clicking on it would display a help bubble.
In CiviCRM 4.3, to (presumably) make it more dynamic, and lessen the page load size, help texts are loaded using Ajax. To convert:
1- In your template (tpl) file, replace the "helpicon" with:
{help id="mymodule-myfield-help" file="CRM/MyExtension/Form/MyForm.hlp"}
2- Create a MyForm.hlp file in the same directory as the template file:
{htxt id="mymodule-myfield-help-title"}
My Field Title
{/htxt}
{htxt id="mymodule-myfield-help"}
My help text here
<strong>may include html</strong>
{/htxt}
There are no restrictions on how to name the ID of the help item, but to avoid CSS/JS namespace clashes, you should use something that reflects your filename hierarchy. Only the "-title" id is requested explicitely, and is appended to your help ID.
You can put multiple help definitions in the same ".hlp" file. That's the aim of the "htxt" blocks: it is equivalent to a "if" statement ("if $params.id == "mymodule-myfield-help"). You can see more examples in the CiviCRM core .tpl files in the templates/ directory.
A few options are available:
{help id="mymodule-myfield-help" file="CRM/MyExtension/Form/MyForm.hlp" title="My help title"}
{help id="mymodule-myfield-help" file="CRM/MyExtension/Form/MyForm.hlp" foo="hello world"}
For example:
{htxt id="mymodule-myfield-help"}
<div>My help text here.</div>
<div>Foo value: {$params.foo}</div>
{/htxt}
So you may have a PHP web application that's slow. Identifying the bottleneck is hard, and all the usual debug tricks have reached their limits (optimizing MySQL, mysqltuner, slow query logs, css/js file aggregation, caching headers, gzip compression, varnish, etc).
If you have root access to the server: xhprof, xdebug and strace.
First try:
Then try strace. For example:
Open "top" in one terminal, look for Apache processes taking a lot of CPU time.
Do a request to your web server that you know is slow, and needs debugging. For example, I was having timeouts while saving a Drupal View.
In another (root) terminal, when a process hits a high CPU%, run the following command:
strace -c -p 24198
Where 24198 is the process ID (PID) of the Apache process taking a lot of CPU time.
When your HTTP request is finished, type "Ctrl+C" to interrupt it.
Here is the result I had:
root@myserver:~# strace -c -p 14985 Process 14985 attached - interrupt to quit ^CProcess 14985 detached % time seconds usecs/call calls errors syscall 71.78 0.005433 0 50002 gettimeofday 11.84 0.000896 2 472 5 stat 3.92 0.000297 0 993 fstat 3.82 0.000289 1 222 4 access 3.08 0.000233 1 361 16 open 2.88 0.000218 1 221 write 0.99 0.000075 0 333 munmap 0.92 0.000070 0 333 mmap 0.77 0.000058 0 232 poll 0.00 0.000000 0 301 6 read 0.00 0.000000 0 351 close 0.00 0.000000 0 590 22 lstat 0.00 0.000000 0 1 rt_sigaction 0.00 0.000000 0 1 rt_sigprocmask 0.00 0.000000 0 15 1 writev [...] 100.00 0.007569 54566 55 total
So, gettimeofday() was using 71% of the CPU time.
Looking around on the web, I found a forum post hinting that this could be a debugger or profiler still running. Ends up that php5-xdebug was at cause.
While my xdebug conf was not profiling by default (it was enabled only if I pass the XDEBUG_PROFILER=1 variable), it seems that it still does some profiling.
If this doesn't help you, I found that looking at the strace output (without "-c") is still often useful. For example, if the APC cache is not working well, the operating system will often stat() the filesystem too often.
Venez nous rencontrer pour discuter informellement de votre expérience avec CiviCRM. Nous ferons aussi une brève présentation des fonctionnalités à venir dans CiviCRM 4.3.
CiviCRM est un puissant système de gestion de relation contact (ou CRM, pour Contact Relationship Management). Il permet à une organisation d'enregistrer et de gérer les informations liées aux diverses personnes et organisations avec qui elle fait affaire.
CiviCRM se concentre sur les besoins des organismes sans but lucratif. La plupart des CRM destinés aux entreprises se concentrent sur la gestion du commerce; CiviCRM met l'accent sur la communication entre les individus, l'engagement communautaire, la gestion des contributions et la gestion des adhésions. CiviCRM s'intègre à Drupal, Joomla et Wordpress.
Svp confirmer votre présence. L'événement est gratuit et ouvert à tous et toutes.
SVP faire passer le mot!
Retweet:
https://twitter.com/MathieuLutfy/status/280677797045886976
Agenda du libre:
http://www.agendadulibre.qc.ca/event/2013/1/?region=6
Forum de CiviCRM:
http://forum.civicrm.org/index.php/topic,27171.0.html
Développeur CiviCRM et Drupal, spécialisé en gestion de membres, commerce en ligne et performance. (plus)
Autres intérêts: IPv6, administration système, téléphonie IP, réseaux wifi en maille.
Participant du groupe Réseau libre, membre du conseil d'administration de l'Association Drupal Montréal et membre «partenaire» de Koumbit.