


How to resolve the MySQL error Duplicate entry ‘comment_publish_action’ for key ‘PRIMARY’?
I’m a beginner in Drupal. I want to import my database to my webserver and get this error when trying to do so: “#1062 – Duplicate entry ‘comment_publish_action’ for key ‘PRIMARY'” I don’t know how to fix this error.... read more
Entity Reference Image not rendered
I have a content type with an Entity Reference field. The field references multiple images. Using Display Suite, I can set the display format to “entity id” and when I view the content, I get a list of IDs as expected. But when I change it to... read more
Relationships Between Nodes on Field
I’m trying to work with some information out of our enterprise system to create an employee directory, and I have a question regarding how I can relate nodes together. I have a content type called Employees, and it has a number of fields, including Employee ID,... read more
How to change the positioning of Drupal blocks when a theme is enabled?
I am developing a Drupal 7 theme. I want to change the position of the blocks when a user set my theme as default. In my theme the main menu is positioned in left sidebar. Suppose the current theme of the user has main menu in the header block, when a user enables my... read more
Reorder Javascript loading in theme?
Some modules insert JavaScript at top of list. I put my $sctipts variable at the bottom of html.tpl.php file just before the closing of body tag. Due to this, some scripts do not work as they get called before jquery or drupal.js . Please provide steps to reorder list... read more
Move the "required" span outside the field label
When a field is required, an asterisk is added inside the <label> tag in a <span> tag. for some reasons, I need to move the <span> tag outside the <label> tag, beside the <label> tag. How can I achieve this? read more
What can we do to remedy the unrecoverable error we encounter for any Drush command?
We used Drush on our server without any problems up until now. Actually we didn’t do / change anything relating to Drush. But now, on every Drush command we issue, we only get an error like so: Drush command terminated abnormally due to an unrecoverable error.... read more
entity_load based on language selection
I have a node for different language, but I would like to load node for “en” language only using entity_load after firing entity query. How can I achieve it using this function in Drupal 7 read more
Installing Drupal with existing Pantheon site?
First, I am completely new to, well, all of this… So I’m sorry if I sound like an idiot. I have been fighting with this thing all day, and I think I’m more confused then when I started. I work for a non-profit, and I’m supposed to be helping... read more
How to embed a Rules Link in a View in order to trigger a Rules link to run?
What is the general process to embed a Rules Link in a View in order to trigger a Rules link to run? I have used the Rules Link module to create a Rules Link embedded in a View (it’s a View that combines all the details of a User). I want the Rules Link to... read more
Drupal 7 treat html 5 data attributes as text
First I wound like to clarity i am not asking for code. This code work on html 5. I create basic page in drupal and implement same code: <div data-top=”opacity: 1″ data–400-top=”opacity: 0″ class=”abc”></div>... read more
All instances of block are not getting removed
This question is a continuation of this Block in Drupal 8, The second problem I am facing is that suppose I select block made for comment section and place it under Sidebar second section and afterwards deselect comment from configuration setting then after clearing... read more
What invokes Bootstrap overrides.css?
I have a purchased theme that I’ve cloned, to which Bootstrap is set as the base theme. I’ve done the standard rebranding procedure of renaming all of the files and functions to match the new theme name [theme2]. It’s mostly working, except that... read more
Facebook Wall module
I’m trying to use the Facebook wall module for the first time. I’ve installed it, created a Facebook App and thought that I’d entered all the right configuration information on both. However, the Facebook Wall/Settings/Page Information is telling me... read more
Add conditional javascript from CDN (external library)
I know it has been discussed here several times, but: Is there a way to include conditional JS from CDN in the head section? My goal is to somehow use drupal_add_js, external. That will stick in the head area, even if I move scripts to the bottom of the page. It is... read more
The login form isn’t rendered
I am newbie to drupal. Recently I changed blocks of my theme and set main page content block to none.I logged out of my site. I tried to access admin panel by appending /user at URL. It redirected to login page but it login form is not appearing as displayed in image... read more
How to add a correlated subquery expression in hook_views_query_alter?
In hook_views_query_alter, how to add a condition which is a correlated subquery in which the value of the condition is an expression? Given a view the produces this query: SELECT node.nid, node.title, history.state FROM node n LEFT JOIN node_revision nr ON n.vid =... read more
How to add / update a field collection without updating parent node/entity?
I needed to to add / update field collections to node entities without updating the node entities. I tried two ways listed in https://www.drupal.org/node/1842304 and http://alexrayu.com/blog/saveupdate-field-collection-without-nodesave but none of them seems to be... read more