Stack Exchange Network

Stack Exchange network consists of 174 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [7]

Version tags should be used only for questions that apply to a version only, not to merely say what version a site is using.

0
votes
0answers
3 views

Drush 8.1.16 not working in Drupal 7.63

Just updated a project to Drupal 7.63. Attempting to execute updb or other commands results in the following error: PHP Fatal error: Uncaught TYPO3\PharStreamWrapper\Exception: Unexpected file ...
0
votes
0answers
7 views

Why does keep saying security update needed after updating?

I upgraded Drupal from 7.60 to 7.62 after the security announcement. After upgrading I ran drush cc all; drush rf to clear caches and refresh the update info. A couple of hours after doing that all ...
0
votes
0answers
16 views

Cannot update my website from 7.60 to any higher version

My website is currently running on the agov-7.x-3.x-dev core and the 7.60 drupal core version. I tried to update the site to Drupal core 7.61, but site showed a fatal error. Fatal error: Class '...
0
votes
1answer
580 views

How to display the profile page in Modal window

By using ctools, i am able to display a form in modal window. Now i wish to display a page(the profile page) in modal window. Below is the sample code (call by menu page callback) to display a html ...
3
votes
6answers
6k views

How to hide default “N/A” option for checkboxes?

I have a "gender" (checkbox) option that I want to show on the user profile page (but not on the registration page). The options are "Male" (default) and "Female". Since I don't make the field ...
0
votes
0answers
7 views

Save content with current user roles and add filter to show only content with current user role

Using drupal 7, when creating new content of the type "Document" the current user roles must be added so I can later on show only Documents of his current role. For example, we have the following ...
-1
votes
0answers
34 views

Can't update/download 7.63 core [on hold]

drsh pm-update -y Update information last refreshed: Thu, 01/17/2019 - 13:36 Name Installed Version Proposed version Message Drupal 7.62 7.63 Update available ...
0
votes
0answers
7 views

How can I expose a multi-image field to the Views module such that different formatters can be used?

I'm building a custom query plugin for the Views module that uses JSON data from a web API, inspired by this article. I've created a series of field handlers that work fine. However, I'm struggling ...
-2
votes
0answers
11 views

How do I make a Panel visibility rule work when the element to check for has to be empty or not set?

I end up with the visibility rule completely hiding the element that is supposed to show. E.g. I want to hide a "New custom content" when taxonomy term for the field "Alternatives" has not been set, ...
0
votes
2answers
23 views

Show View When Empty and Hide View When Not Empty!

I have a webform as a block which sets a value connected to the logged in user. I want to display the webform if it hasn't been filled in yet by authenticated users, and hide it when it has (based on ...
1
vote
2answers
7k views

Notice: Undefined variable: node in eval() and Notice: Trying to get property of non-object in eval()

After upgrading to Drupal 7, I get the following error on my recent log messages: Notice: Undefined variable: node in eval() (line 24 of /home/scode/public_html/modules/php/php.module(74) : eval()'...
1
vote
1answer
556 views

How to change image size and position when uploading to article in tb_rave_starter

I want to change image size and position How could this be done, please help me.
2
votes
3answers
602 views

Is there any way to know if it is the first visit of a Anonymous User?

I'd like to know if is there any way to know if it is the first visit of a Anonymous User? If so, can I fire up a rule to redirect the visitor to other page.
0
votes
1answer
559 views

Angular application and Drupal services

I am creating an Angular application using headless Drupal. I am using Drupal services module for web services. I am trying to implement login mechanism in this app. Login is working fine but to ...
4
votes
1answer
2k views

Form states with “and” and “or” conditions

Using form API in D7, I need to use from states to setup a visible input with this condition : field1 = value A AND (field2 = value B OR value C OR value D) Something like this, but this example ...
0
votes
1answer
8 views

Views Contextual Filter by taxonomy in field collection

I have a Drupal 7 project I'm working on that's got me stumped. I'm building a site where the node (Decals) are applicable to models and years (This decal is correct for this model of this year). ...
2
votes
1answer
552 views

Taxonomy term name alias in taxonomy term autocomplete

I'd like to have two or more names for one Term-ID in my custom taxonomy dictionary. As for now I've added a custom field and named it "Synonyms". The field can have multiple values. How can I ...
12
votes
4answers
25k views

How to use LIKE condition in db_select() query?

How do you build up a LIKE condition in a db_select() query? I know how to do this with a db_query() API call, but is there a special syntax / method for doing this with db_select()?
0
votes
2answers
562 views

How to validate deletion of custom entity?

I'm making decently complex system, where many entities are referencing each other, and I don't want to allow any broken references. That is why I would like to implement validation at entity deletion,...
0
votes
2answers
615 views

Add bootstrap row class on every n views rows

I am using Drupal Bootstrap and to get the correct positioning I am using bootstrap rows and columns classes. How do I render a bootstrap row class on every let's say 3 view rows (bootstrap columns)? ...
2
votes
2answers
974 views

How to use Represenstive Views to display users representative nodes?

Main view (User entity): Fields: (Representative node) Content: Nid (Representative node) Content: Type (Representative node) Content: Post date (Representative node) Content: Title other fields ...
1
vote
2answers
301 views

How do I show only the latest post from each user in a view?

I'm trying to show a list of only the most recently published post by every user (not including the logged in user) in a view. What should my Views filters look like in order to accomplish this? I'm ...
0
votes
2answers
629 views

Can I create a link to a nodes taxonomy page in Drupal?

I have a page that has a single category applied to it, for this example, "Self Help Books". I want to put a place on content type that display a "view all [insert category here]" that links to that ...
2
votes
2answers
554 views

How to get child terms based on parent terms between two different taxonomies

I have created two vocabulary Program Topics I want to load the topics based on the program selection. It looks like category and subcategory. I created some program like java, .net, PHP and I ...
2
votes
2answers
561 views

create public profile page for specific roles only

Here is what I am trying to do. I used profile2 to create an employee profile type that only users with the user role of employee could fill out. What I want to do with views ( which I am not even ...
0
votes
0answers
12 views

Ability to migrate or import/export paragraph bundle from one site to another

I have several custom paragraph bundles containing a large amount of customization. I do not want to re-create them. Is there a module that allows me to export a paragraph bundle and then upload it to ...
0
votes
0answers
9 views

Reuse entered field value on next page

I would like to show on my second page of my Drupal Webform a value which I entered on the first page. On my first page I have a combobox in which I choose a specific value. This value I would like ...
0
votes
1answer
563 views

Load Javascript when a particular form is loaded

I have the code below in my own drupal module(myid): myid.module file: function myid_init() { drupal_add_js(drupal_get_path("module", "myid") . "/js/myid.js"); } function myid_menu() { $...
1
vote
1answer
31 views

How are values passed from the database to the templating system?

I haven't quite figured out how Drupal passes the values from the database or the back-end to the theme variables in the template. Which function does it use to disperse the variables to the ...
0
votes
2answers
588 views

Creating a custom login system by developing a new module

I've created 2 files: login_process.info login_process.module I've created the table "user" in the database that Drupal is using. I want to display a custom login form with fields "Username" and "...
1
vote
1answer
786 views

Block overriding with template file doesn't work

The Drupal version I'm using is v7.34. I'm using sub-theme created from Bootstrap as base theme. My problem is, I want to override the "User Login Block" and put it in the header region (top bar), so ...
0
votes
1answer
563 views

Entity Translation: Translate breadcrumb

I'm having issues translating breadcrumb. Everything works, menu items, strings etc... a part from breadcrumb. I've tried hook_menu_breadcrumb_alter to reset the title with no success. How can I ...
1
vote
0answers
23 views

Links in stage environments are absolute and send users to live enviroment

This problem has been driving crazy for years. whenever I create a stage environment of a site, I copy the database from the production site. some of the links there - whether in the menus or in the ...
0
votes
0answers
49 views
+50

Print commerce pricing attributes to email receipt

Users cannot see what size or color shirt they purchased in the email receipt because tokens won't print the attribute fields provided by Commerce Product Attributes / Commerce Pricing Attributes / ...
7
votes
3answers
10k views

Redirect /user/login to HTTPS, all other requests to HTTP

I'm using Drupal 7. The login page for my users is located at /user/login, so the default login path. I need that page to be encrypted using SSL so people aren't transmitting their passwords in the ...
1
vote
1answer
563 views

How to trigger a rule if a node has a certain Taxonomy term?

I'm trying to create a rule using Rules that will apply a watermark to an image within a node (using the ImageCache Actions module) if that given node has a specific Taxonomy term. For example, nodes ...
2
votes
1answer
593 views

How to expose filter for entity reference as dropdown in the Search API view?

In my Search API view, I'd like an Exposed filter > Entity reference to be a select box, not a text field. Details I have a view which I created like: Views > Add new view > Show: default node ...
1
vote
1answer
627 views

How do I create product variants?

I have a product (for example, "Desk") which has two attributes (size and life). Size has the values small, medium, and large. Life has the values 7 years and 10 years. The price is different for ...
1
vote
3answers
563 views

How to show sub-menu in a block in drupal 7?

I have a menu in Drupal 7 with 2 main links like home and about us, but I have 3 sub menu in about us like About us About Us 1 About Us 2 I need to show these 2 submenu in a block and show ...
2
votes
3answers
9k views

Need a list of terms from a vocabulary machine name

How can I get the terms of a vocabulary using vocabulary machine name. I have used the following code, although it works for me but I am looking for efficient methods. $vocabulary = ...
2
votes
4answers
6k views

Hiding a block based on code

I'm looking for the best way to programmatically hide a block. In Drupal 6 I'd normally use preprocess_block to do all my logic and then unset title and content/body from there. I've tried to do same ...
0
votes
0answers
16 views

How to token Insert nth element of Iframe?

Module used: Token Insert I have a content type with an iframe field which accepts multiple values. In my wysiwyg body field, I did a token insert. When I add this iframe field which has only one ...
0
votes
1answer
12 views

Theme preprocess for module's template variables using dynamic path

I am doing templating for a module that adds a block in the module's folder so that the template can be there, and it may be overridden in the theme if desired. I want the module to support different "...
0
votes
1answer
575 views

How do I control if an ajax webform has errors?

I have a webform that sends an email upon submission. Ajax is enabled so when I hit submit and there are errors on the form they will show instantly. However if there are no errors I would like to ...
-1
votes
1answer
16 views

User role update report

Could you let me know how to check how many users converted from one role to another for a specific period of time (for example how many changed roles from user to superuser from 01/09/2017 to 01/02/...
1
vote
2answers
156 views

How to combine two batch operations for views data export into one?

I have been using a custom module that was posted here: https://www.drupal.org/node/1875456 I slightly modified this module and created two copies of it, as I have two views and planning to add ...
0
votes
1answer
81 views

How to identify and target a form element?

A similar question has been asked before: How do you identify a form element? I am using the Devel module and dpm($form) outputs the object nicely: But I can't set/change the default value of a ...
0
votes
1answer
613 views

How to add AJAX call back from another AJAX result in a form

I want to use 2 AJAX call back within a form. The scenario is like I am having a text field and a Search button which is defined in the form alter function. After entering a text and clicking on the ...
-1
votes
1answer
570 views

Module to upload a folder and view it as in google drive [on hold]

I want to upload a folder, that contains two sub-folders and these sub-folders contains couple of files. I'm trying to upload the folder in such a way that it appears similar to the tree structure ...
0
votes
3answers
616 views

Floating Block in drupal

I'm using Floating Block module in drupal 7 to fix a block after scrolling, but how can I tell the block do not fix when you see the footer section?