w3hello.com logo
Home PHP C# C++ Android Java Javascript Python IOS SQL HTML videos Categories
  Home » DRUPAL » Page 1
Drupal 7 keeps saying password error for every login and logout
As this is not a direct question and is to vague to give an answer to I will supply steps that I would generally follow if I was debugging this problem. I'd take a look at the users table for the user in question. Take a copy of the 'pass' field for the user in question and follow your steps noting the times in which this password changes. If the password changes at any point and then reverts bac

Categories : Drupal

Drupal image disappears
Please try and reduce the amount of php code within your theming layer. Within your page template: <div role="document" class="page"> <!-- MENU--> <!--.l-header region --> <header role="banner" class="l-header" > <div class="header-image" style="background-image:url(<?php print $header_image; ?>);"> </div> </div> Within your template.php i

Categories : Drupal

Drupal 7 - How to display the number of nodes for each term in the expanded filter?
You can use search api and facet api modules to do so. Screenshot from facet api module.

Categories : Drupal

Create quicktabs programmatically drupal
If your problem is just the ugly query string ?qt-my_custom_quicktab=..., you can prevent that using javascript by disabling the default click action for the links that toggle tab-panels. Example: jQuery(function() { jQuery('#your-quicktab-link-selector').click(function(evn) { evn.preventDefault(); }); });

Categories : Drupal

How to wrap field in custom markup?
This is possible via HOOK_process_field(). Use this hook to define a new template file for your field by adding it to theme_hook_suggestions array (place the template file in your module directory, because you wanted to change the theme -as you mentioned-). More info about field template suggestions. Then, you will need to add the module path to drupal theme registry, so it picks up the template

Categories : Drupal

Just HOW do I remove this pesky block
Navigate to the blocks admin page at "admin/structure/block". There somewhere you should see your block (generated from a view) named something like "View: related forums". Click configure and change this blocks visibility settings under the "pages" tab at the bottom of the configure page. If this does not work, check that this block is not being specifically included in a template file. Ano

Categories : Drupal

Drupal 7 Views - Group By Content Type and Taxonomy Term
To fix this i used 2 views and set them as blocks to add on the same page. Firstly, got items by content type which displayed all my items needed. Secondly, set view to show individual fields, this way i could group by taxonomy term which got my desired view. It was simple enough, i was probably over complicating.

Categories : Drupal

Drupal: How to restrict apachesolr search results by user/article facets
You can add a relationship to the taxonomy term "Workgroup" and use a contextual filter for the current user. In the contextual filters section, you can change the behavior when the filter is not present.

Categories : Drupal

Drupal Commerce Kickstart Product list theming
Try this : Drupal.behaviors.Mouse_enter_on_product={ attach: function(context, settings){ $('.field-type-image').mouseenter(function(){ $(this).parent().find('.field-type-commerce-product-reference').show(); }); } } Drupal.behaviors.Mouse_leave_from_product={ attach: function(context, settings){ $('.field-type-image').mouseleave(function(){ $(this)

Categories : Drupal

Drush generates .make file on server but it is not in the working directory?
Maybe it depends on your Drush version, but with Drush 5.x the makefile is sent to stout. This is how I use make-generate if I want my makefile written in /root/: drush make-generate -r /path/of/my/drupal/installation > /root/drupal-org.make

Categories : Drupal

How To Set Drush Backup Directory
This took me hours to figure out embarrassingly, so I just wanted to share this with anyone looking for this in the future as I could not find a single answer to this anywhere at the time. You just need to set the 'backup-dir' option in your drushrc.php like this: $options['backup-dir'] = '/your/new/backup-dir'; Note no trailing slash. I hope someone else finds this useful.

Categories : Drupal

How to add attribute class in theme('pager') in drupal 7?
As the theme_pager function only expects 1 parameter (an array of variables), so your theme function call should look like this: $directory_table .= theme('pager', array('quantity' => $STAFF_COUNT, 'element' => array('class' => array('pagination pull-right')))); BUT: It seems that theme_pager just sets a 'pager' class ignoring any variables which you may send to the function. So,

Categories : Drupal

How to remove password and confirm password title from registration in drupal 7?
To override the properties of the pass1 and pass2, you need to add an additional #process handler that runs after FAPI's form_process_password_confirm, like so: <?php /** * @file * Allows modification of password fields in FAPI */ function register_alter_form_alter(&$form, &$form_state, $form_id) { switch ($form_id) { case 'user_register_form': // Here we need to pro

Categories : Drupal

how to configure drupal commerce product attributes?
you need to create two taxonomies (better for search by..., But it can be a simple text field) "kg" and "flavor", next add to the product (commerce product) two Term reference field ensuring enabled in the options field: "Enable this field to function as an attribute field on Add to Cart forms." and set Number of Values ​​to 1. Now create the products, one for each attribute Product A - Xkg -

Categories : Drupal

Drupal HOOK_views_pre_render not working for simple change of $views->result
<?php function image_alt_tag_alter_views_post_execute(&$view) { global $user; if ($view->name == "we_print_for_menu") { path = arg(0) . "/" . arg(1); $alias = drupal_get_path_alias($path); dsm($view); for ($i = 0; $i < count($view->result); ++$i) { $amended_alt = $view->result[$i]->_field_data['nid']['entity']->field_image_front_menu['und'][0]

Categories : Drupal

How can a group manager create new users from within an Organic Group?
hi there you have to use OG Invite People this module should provide you the invite users in the group from out side of site not already exist users. when you send an invite to the some one user by email this module should create a user and send an email to the user with one time login link. invitee should login through this link and update his/her profile information. and that is done for more

Categories : Drupal

Why is the node title null when it is set in the database?
If you're in a standard node edit form which it looks like you are from the example url you gave, I'd probably start by disabling javascript to make sure this is not cleared out on the client side. If this is not the case I'd start by looking for any hook_form_alter or hook_form_FORM_ID_alters that relate to this. A quick search would be to search for ['title'] or ["title"] within the modules dir

Categories : Drupal

Drupal 7 add shortcode into wysiwyg
You can use token_insert to do that. When you install this module, you can insert the year by this: date : [Y] Regards.

Categories : Drupal

Drupal Computed Field with Views
Even if it is not the best solution, after installing Views PHP module of Drupal, problem is slightly solved. I still get the error message on every time I try to change something, also I am having difficulties on making a change on the view, like saving and adding the same thing 5 times and got successfull, still it is a solution.

Categories : Drupal

In nodereference field of a content type, Is it possible to show the content type name added with the autocomplete results?
I created a new custom Module nodereference_patch with below hook /* * Altering nodereference/autocomplete menu using menu alter */ function nodereference_patch_menu_alter(&$items) { $items['nodereference/autocomplete']['page callback'] = 'nodereference_patch_new_nodereference_autocomplete'; } Then, I copied the nodereference_autocomplete function into your custom module, changing it's

Categories : Drupal

Drupal 7 Search Result in a custom form
Just had a quick rewrite of a couple of aspects, didn't test it so there might be the odd typo or two. The only thing I've really added other than a couple of standards is the use of $form_state['storage'], which is primary used for multi-step forms, but I've used it a couple of times to achieve what you are trying to do. (https://www.drupal.org/node/1850410) Also, the use of render instead of dr

Categories : Drupal

Views exposed filter on node language, used on 2 different sites, with a different language list
The solution The solution is to set the filter as not required, so you can avoid to select values for the filter. In this case, the list will be filled with the current languages, as expected. The exported view doesn't contain any hard coded values. To go a bit further if you want only the current languages, but not these values : 'CURRENT_LANGUAGE' => t("Current user's language" , 'DEFAU

Categories : Drupal

kickstart commerce 2 in openshift /admin/modules/list/confirm with no response (white dead screen)
You need to know first what error is being thrown that causes the white dead screen. To be able to do so, you will need to add the following lines to your drupal site's index.php file. ini_set('display_errors', 1); ini_set('display_startup_errors', 1); error_reporting(E_ALL); Then visit the page that causes the white screen, you will see the error message.

Categories : Drupal

Disable entire cache for development
to disable entire cache (tiwg + Drupal cache) : first copy and rename the sites/example.settings.local.php to be sites/default/settings.local.php $ cp sites/example.settings.local.php sites/default/settings.local.php then open settings.php file in sites/default and uncomment these lines: # if (file_exists(__DIR__ . '/settings.local.php')) { # include __DIR__ . '/settings.local.php'; # }

Categories : Drupal

How to make the submenu on the same row as the parent link?
Even if I don't understand clearly your question, to achieve the result of the website you linked, you can try the Superfish module or the MegaMenu module.

Categories : Drupal

How to attach a file after a webform has been submitted
Write a custom module with hook_form_alter implementation, and add a custom submission callback to handle the file attachment. This way you can handle form fields and values, before the webform values getting saved in database or getting sent via email. Code sample: function MODULE_form_alter(&$form, &$form_state, $form_id) { if($form_id === 'YOUR_FORM_ID') { // code as need

Categories : Drupal

Unable to reinstall webform second time
I've also manually deleted stuff in the past and its kind of complicated to get rid of everything that way. Check that you've drop every table called webform* Clear the cache Check under admin/modules/uninstall so there is nothing left of webform Clear the cache Remove sites/all/modules/webform Clear the cache Clear the cache (with drush) Clear the cache (with your left hand (if youre righthan

Categories : Drupal

Adding profile2 profile to panel in drupal7
Are you using the Page manager? Add the "currently logged in user" to the context and you should get the ability to add personal information to the page. Another way to go is to create a view with a contextual filter to the currently logged in user. The view can then later be displayed on the panels page (without context).

Categories : Drupal

Drupal - how to modify only one instance of a menu with them_menu_link
So I figured out a fix for this one, but I'm not sure if it's the best way to go about it. Using krumo($variables) inside the theme_menu_link function I was able to see that each menu has an array at $variables['element']['#theme'], where the first item is the block that the menu is in. So for the main navigation: $variables['element']['#theme'][0] === 'menu_link__menu_block__1', and for the sid

Categories : Drupal

How do I programmatically delete user profile picture?
You need to copy the file using file_copy before calling file_save. It should automatically change the file path if it matched any other file on server, therefore it will not throw this error. $file = new StdClass(); // ..... your code as it is $file = file_copy($file, 'public://', FILE_EXISTS_RENAME); file_save($file);

Categories : Drupal

Run individual cron jobs with Drush
Here's how I am eval'ing my own cron hook. 1) Find the appropriate hook_cron call in your module. modulename_cron is what you want. 2) Figure out if any specific variables impact when it is run. In my case, there is a variable modulename_cron_last which tracks the last time the cron was run. I have to force this to 0 to get it to run. 3) Run drush: drush eval "variable_set('modulename_cron_las

Categories : Drupal

Drupal 7 Views - Add a wrapper around rows for unformatted list from admin panel
Use the style output template of the views/display. You will find it in "Theming information". To get it from your views/display do: Advanced > Theme: information The first template is "views-view-unformatted.tpl.php" but you can use any in the list. The original code is: <?php if (!empty($title)): ?> <h3><?php print $title; ?></h3> <?php endif; ?> <?php

Categories : Drupal

How would I modify this Alfresco query to display folders as well as documents
CMIS standard implements cmis:document and cmis:folder as two of four cmis:baseTypeId objects. Even if CMIS has JOIN as one of the SQL statements, Alfresco implementation currently does not support JOIN except as an extension to support aspects. This extension is Alfresco specific. This means that you can't achieve something like: SELECT * FROM cmis:folder INNER JOIN cmis:document etc as Alfre

Categories : Drupal

Drupal 7 module development. Showing specific class on specified time only
Assuming the content you want to display is a node there are two approaches you can take. First is the Drupal 6 way, but it still works in Drupal 7. You can define a new content type with hook_node_info and then define an edit form with hook_form and view content with hook_view. Since this is the "old" way of doing things I won't elaborate more on it. The fancy new way in Drupal 7 is through the

Categories : Drupal

remove a drupal select list option from a node add form
Yes, In your hook_form_alter, change the '#type' from 'select' to 'hidden'. And set the '#value' to the value you want. You could also unset() the '#options' but I don't think it will matter as the hidden type should ignore it. This should be enough to do what you want I think

Categories : Drupal

Passing parameter from Drupal Panel page into View
I am not sure, that I am understood you correctly, but if you want to pass the different values for the few views, you may use the "Contextual filters" for each of them. In View "Pane settings" set "Argument input" parameter to "From context" point, and then choose a value, that you need. This video can explain, how to do it. http://nodeone.se/en/learn-page-manager-part-5-views-content-panes-basic

Categories : Drupal

Special characters get converted in CiviCRM templates
You can't add PHP code in CiviCRM template but you can add smarty code by adding the following line in your settings file : define( 'CIVICRM_MAIL_SMARTY', 1 ); You can find an example about it in CiviCRM wiki page : Smarty in mail templates

Categories : Drupal

How to place custom views area handler into views header programatically?
function YOURMODULENAME_views_pre_view(&$view, &$display_id, &$args) { if($view->name == 'YOURVIEWNAME' && $display_id == 'YOURDISPLAYID') { $footer = "This is the text that I want in my footer!!!!"; $options = array( 'id' => 'area', 'table' => 'views', 'field' => 'area', 'empty' => FALSE, 'content' => $footer,

Categories : Drupal

Drupal: Store 'default theme' in Feature
If you mean the actual theme, templates and all, then no. Features is only really intended for bundling configuration. If you just mean the setting for the default theme, yes: install Strongarm and select the theme_default variable when you're creating your Feature.

Categories : Drupal




© Copyright 2018 w3hello.com Publishing Limited. All rights reserved.