2+
votes
64 views

Sometimes you receive an error "The content on this page has either been modified by another user, or you have already submitted modifications using this form. As a result, your changes cannot be saved." .

The above error means

1) Either the problem is related to two users editing the same node
2) Or it can be related to max_input_vars in your php.ini

Solutions:

1) Clear cache of your browser
2) Edit php.ini file. Usually its located on /etc/php5/...

Read More
7+
votes
304 views

In below example we will find total number of audio/video files and add their sizes to show total volume on disk.

find /folder/destination -type f -regex '.*\.\(mkv\|mp4\|wmv\|flv\|webm\|mov\|mp3\)' -exec du -ch {} + | grep total$
7.8G total

/folder/destination is destination of your folder inside which you want to calculate total size of audio/video files

To calculate total size any folder browse in that directory and run:

... Read More
6+
votes
821 views

There are many methods to recover admin password described here https://www.drupal.org/node/44164 but this method gives you a admin panel to recover admin username and password.

Please copy and paste the below code in a file and name it whatever you like or download the attachment in this post, remove .txt extension and drop it in root of your website[in same place where you find robots.txt]. In my case i named it as "generate_drupal_admin_pwd.php".

and then access your website...

Read More
4+
votes
367 views

Use Case : Suppose you have a intranet website which is used for organization and you would like to upgrade that website and its module to latest version. For this you would need to use a proxy server.

A proxy server is a computer(server) which will raise the request to Drupal and act as an intermediate between your actual Drupal server and drupal.org.
So possible scenario is like this:

   Drupal Website(Actual Server) ⇄ Proxy Server(Intermediate...
Read More
2+
votes
575 views

If apache server failed to restart like this :

sudo service httpd restart
Stopping httpd: [FAILED]
Starting httpd: [FAILED]

then you need to check error logs which might be under this directory if you are running CentOS:

/var/log/httpd

inside this directory you will see error_log. Open this file and read last few entries with:

trail -100...
Read More
3+
votes
475 views

Sometimes you need to show page to anonymous user. Create a page using hook_menu by using below code:

  $items['your/path/name'] = array(
    'title' => 'You Title',
    'description' => 'Your Page Description',
    'page callback' => '_any_function_if_you_want_to_call',
    //'access arguments' => TRUE, <-- Comment or remove this if you have it
    'access callback' => TRUE,  <-- Add this
    'page arguments' => array(2), // Optional if...
Read More
3+
votes
515 views

If you encode with base64 and provide in URL, its not user friendly because they will not appear as proper link. By default it produces a string which contains characters like "+", "=" and "/" which will not let it become a URL with underline. Even you use to generate in emails, only the sub part of your URL will appear as URL with underline and rest will be ignored and appeared as weird characters.

If you want to use it in URL string and get the values as $_GET or even use it in...

Read More
10+
votes
699 views
label[for=email]
{
    /* ...definitions here... */
}
5+
votes
638 views

In Drupal, when you add exposed filters, it defaults to first word of your select list. But if you want to show all the results on page load then you have to set the exposed filters to "Any" option by default.

To do this:

Add a filter and Expose filter to visitors.

Choose Single filter, give it a label, choose "Is one of" under Operator, and have no terms selected/highlighted in the "Select terms from vocabulary" box. The only option checked under the vocab box is "...

Read More
9+
votes
502 views

You have to add a simple CSS on your CSS global file.

.ajax-progress-throbber {
    display: none;
}

To remove from a particular view add the view class(.your-view-class) before .ajax-progress-throbber class like:

.your-view-class .ajax-progress-throbber {
    display: none;
}