Drupal 7

Warning message

JQuery Cycle must be installed in order to run the slideshow. Please go to Status Report for instructions.

On shared server you dont have an access to "root", so your su command will not work.  Now if you have to add anything or modify the settings in php.ini file, you have to create a local copy of php.ini file for your website on root.

To do this, you have to login into SSH (Secure Shell) by using a program like putty  .

After you login, copy your php.ini file using cp command 

cp /web/etc/php.ini  /var/www/vhosts/sitename/php.ini

You might have different paths, if you dont know where is your php.ini file over the server, you can use the following command to find the file

find . -type f -name 'php.ini' 

Now you can change anything in your php.ini file and save it. You can view the changes by going here admin/reports/status/php in your drupal website.

 

We enable all the "performance settings" which includes "javascript and css optimization" . Sometimes that javascript or css optimization can conflict on various pages and create various bugs, disturb the design of our page, misplace the elements on the page.

To prevent from this, we can disable the JS or CSS to render on that particular pages. To do this we have to use drupal's global configuration variable . Suppose you want to prevent JS and CSS on blog creation page then  :

 global $conf;

 if((arg(0) == 'node' && arg(1) == 'add' && arg(2) == 'blog')) {
            
         $conf['preprocess_css'] = FALSE;
         $conf['preprocess_js'] = FALSE;

 }

1. Put your website in offline mode inside your site maintenance mode.

2. Download the latest module from drupal.org.

3. Backup your database and module which you are going to replace, incase something went wrong. 

4. Replace that module with latest module that you have downloaded from drupal.org.

5. Go to your website and run update.php script . For example www.example.com/update.php .

6. Run the update steps and thats it !

Lightbox2 is a great module for drupal . It allow us to overlay images on the pages . But it has a severe performance issues also when it comes to large scale websites which has many content types and presets.

It makes your website pages load slower by executing thousand of queries which will take potential time in execution.

Some potential facts that might tell you that your website is suffering from this cause :

1. Admin pages are hard to surf.

2. It takes more time to "modules" page than before. Also, after "saving configuration" on modules page, it takes much longer time than expected.

3. Your website login process become slow .

4. On pages where light box is applied "inline" using relation ("rel") attribute consume much more time to render.

If you are facing above issue, then you might try the patch which is given in this post https://drupal.org/node/409354#comment-3884016 . After trying this patch on the production website, the speed goes faster on all above pages and lightbox2 starts executing normally like other modules.

This patch gives you admin interface for configuration, but rather than setting anything on administration page. You will feel the difference after applying this patch. Though you can configure the new settings inside your lightbox settings.

You can find the module with patch applied with this post. You can download it and install it on your website.

If you are looking for another solution, which is not administrative, you can review this post also https://drupal.org/node/409354#comment-4563068 . It allows you to define settings in settings.php file.

 

 

In Drupal 6 you can for the FORM API :


// register a new user
$form_state = array();
$form_state['values']['name'] = 'robo-user';
$form_state['values']['mail'] = 'robouser@example.com';
$form_state['values']['pass'] = 'password';
$form_state['values']['op'] = t('Create new account');
drupal_execute('user_register', $form_state);

In Drupal 6 the queries are by default showing in the views 2 

But as of Drupal 7 things get changed and now if you want to see queries at the end of running view. You have to go to Structure >> Views >> Settings >> Inside Live preview Settings Box :

Check the option "Show the SQL query" and Save it. 

HTML/Drupal Disabled element/attribute :

1. If the disabled attribute is used, then the value do not get passed to the form processor while submitting the form. It means you cannot receive the values of that element to process them.

2. You can not set focus on these elements .

3. You can not navigate these elements with the help of TAB.

 

HTML/Drupal Readonly element/attribute :

1. If the Readonly attribute is used, then the value get passed to the form processor and you can process the values which are submitted by Readonly element.

2. You can set focus on these elements .

3. You can navigate these elements with the help of TAB.

ISSUE : Notice: Undefined index: src in theme_admin_menu_icon() (line 924 of /path/to/drupal/sites/all/modules/contrib/admin_menu/admin_menu.inc).

SOLUTION : This may be caused when you recently update the admin module. You can solve it by going into the database and flush all the "cache" tables like cache blocks, cache_theme etc. just select all the tables with preceding "cache_" name and empty them from phpmyadmin. This will solve your problem

ISSUE : Sorry, there have been more than 5 failed login attempts for this account. It is temporarily blocked. Try again later or request a new password.

SOLUTION : This means that your IP address is in the block list of DRUPAL. Now to release your ip address . 

                   You have to to go to database, find the table "flood" and remove all entries from that table.

                   Or run command "DELETE FROM flood" . After this your IP has been released and you can again login to your system.

 

For adding the video to the drupal there is simple module video_embed_field

All you have to do is install the module, this will create the "Video Embed" field inside the content type "field types" , you have to drop down and select this field .

Now you can add any youtube or vimeo link to show the video's

Pages

Subscribe to RSS - Drupal 7