If you call functions drupal_add_js() or drupal_add_css() in a hook_form_alter() of a custom module, it may happen that if the form is not validated it won't load Javascrpt and CSS.
You can fix this problem by adding the #after_build to your form, and then moving drupal_add_js() and drupal_add_css() in the associated function. This way the hook_form_alter() will contains form elements only, and the #after_build will load Javascript and CSS.
The date_popup module included in the date package allows you to create a calendar widget to add dates. You just need to set the date_popup type to a textbox element, for example:
$form['start_date'] = array(
'#type' => 'date_popup',
'#title' => 'Start date',
'#default_value' => $values['start_date'],
'#date_format' => 'm/d/Y',
'#size' => 13,
);
A click in the textbox will show up a calendar widget to choose the date.
Be careful: DO NOT ADD the #maxlength property to the element, otherwise you will get an error like this:
warning: mb_strlen() expects parameter 1 to be string, array given in D:\localhost\drupal\includes\unicode.inc on line 410.
The error occurs because the date_popup module transforms the date value in an array, so the max length check performed by form validation execues the drupal_strlen function on an array and not a string.
It may happen that the option to display hidden files and folder is disabled or is not working. You can try either one of the following tricks to fix this problem:
Sometimes you might notice problems opening the Network connections. For example all connections have disappeared, or when you create an Internet connection you might find the options Network Connection Dial Up Modem and broadband connection with user name and password are grayed out.
In order to troubleshoot this you have first to check if the service Remote Access Connection Manager is enabled, so do the following these steps:
If you got the error message Error 126: specified module could not be found when starting the service, do the follwing steps:
If you get the error message specified module could not be found for any of those commands, those files might be missing from the \Windows\System32 directory. Just copy those files from another PC having the same operating system, or restore them from the XP Setup CD doing the following steps:
Now you can redo the regsvr32 commands for the expanded files, and then try to enabled the Remote Access Connection Manager service. When enabled, you will be able to browse the Netword connections page and create all kind of connections.
Since PHP 5.2.x it may happen to find unexpected empty output on regular expressions (preg_replace, preg_match, etc...) when parsing very long strings. This bug is caused by a restrictive limit of pcre.backtrack_limit directive. The default value is 100000, so it can handle strings up to 100000 characters. It would make more sense to change the limit to a higher value, even 20MB. The same change can be applied to the pcre.recursion_limit directive.
Both directives can be changed in the php.ini file:
pcre.backtrack_limit=20971520
pcre.recursion_limit=20971520
or by ini_set():
ini_set('pcre.backtrack_limit', 20971520);
ini_set('pcre.recursion_limit', 20971520);
