All Questions

-1
votes
2answers
78 views

Naming a template file

D7, bartik. A comment form is created by an .inc file (modulename.page.inc). This comment form is to comment on existing comments. To create the comment form, the inc page says: function ...
-1
votes
1answer
266 views

How do I get the login form submitted values in hook_user_login()?

Since hook_user_login() in Drupal 8 has only 1 arg, how can I get the values submitted in the form? In other words, what is the equivalent of $edit['input]['element_name'] I would use in Drupal 7?
-1
votes
1answer
58 views

Captcha image is not detected but installed and working properly

I have installed Captcha and Image Captcha submodule (included in Captcha). It works perfectly, and displays the captcha image. However, when trying to install Captcha Refresh module, I found that ...
-1
votes
2answers
458 views

Drupal 7 upgrade Image module

I was upgrading a site to Drupal 7 but as you may know there are couple of modules which are moved to the core modules in Drupal 7. I had installed Image and Image Cache module in Drupal 6, but now ...
-1
votes
2answers
38 views

How to create one more registation page in drupal site

In our drupal site we have a Registration page. and the new requirement is creating the one more registration page with same functionality(newly created registration page also use same database to ...
-1
votes
2answers
319 views

Is it okay to use PhP include() in body of basic page? [closed]

Aside from the usual warnings about using PhP, which I understand and am taking seriously, is there any drawback to using the PhP include() function in the "Body" box of the "Edit Basic page" form? ...
-1
votes
3answers
857 views

image URLs messing up

I recently uploaded my site to a live server and the following issue occurs. When I add an image to a node and check the url from the admin view it all looks fine and the image displays if I open ...
-2
votes
1answer
236 views

Implement hook_token_info and hook_tokens

I am trying to create custom tokens, but my implementation doesn't work. I have implemented hook_token_info() and hook_tokens() like this in my .theme file for Drupal 7. /** * Implements ...
-2
votes
1answer
5k views

xml sitemap module : XML declaration allowed only at the start of the document [closed]

I installed the xml sitemap module, when I go to my sitemap.xml page, it give me an error: This page contains the following errors: error on line 1 at column 6: XML declaration allowed only at ...
-2
votes
2answers
1k views

How can I create a user account when a node is created?

How can I show the user registration form upon node creation and create a new user when a node is submitted in Drupal 7? I want this to be done in the Drupal way without writing any code.
-2
votes
1answer
55 views

How do I add a subheading to a view? [closed]

I have created a custom content type to upload documents in English and French.Currently using views module I am listing the uploaded files based on date of creation,now I have to categorize the files ...
-2
votes
3answers
310 views

Get value from field in php [closed]

I am trying to get fields value in php but I cannot make it work. My code <?php $value = $node->field_price; return $value; ?> Can somebody please help me to solve this? I believe it has ...
-2
votes
1answer
59 views

Do I need different content types for correlated items [closed]

I have different types of correlated content items like news, articles, ebooks and books. Some items have same fields, for example news and articles, but some have different fields. Do I make ...
-2
votes
2answers
278 views

Why is HTML rendering as Plain Text in a simple 'title' alteration?

I have been able to change each node's Comment Link 'title' text (that on default renders 'Add new comment') with the below code, but if I add HTML, it renders as plain text. I'm trying to add a ...
-2
votes
1answer
51 views

How to enable template while creating node

I want to enable different template for different node while creating node. for eg: I am creating blog1 node, then while creating blog1 node I should be able to choose template in drupal 7. Please ...
-2
votes
1answer
19 views

Creating a displayable 'index' of content nodes within a path

Ok, it's been over a decade since I've worked with Drupal (primary use was for a personal blogging platform, with a bit of extra extensibility and a well developed plugin ecosystem). Sadly, most of my ...
-2
votes
1answer
211 views

How to enable or disable the “Add to Cart” button for products based on the role of the store owner?

I have Drupal 8 and Commerce 2. I created a "Merchant" and "Premium Merchant" role. By default, users who create a store have the "Merchant" role. What I am trying to do is the following. If the ...
-2
votes
1answer
358 views

Shopping Cart view, change quantity widget to select box

I have two kinds of price type: price per unit and price per weight. I have managed to use hook_form_alter() to change the widget textbox to a predefined select list. For some items it fills the ...
-2
votes
2answers
782 views

File browser tab displaying in admin overlay

I've got File browser tab displaying in the admin overlay for all authenticated users. WHere is this setting coming from?
-2
votes
2answers
443 views

Retaining URL Alias without removing when modified nodes or run bulk update

I want to keep the old aliases when I have modified the content. I don't want the alias to be modified/removed. This is very import point in SEO perspective. How do I do this? Update: I apologize if ...
-2
votes
1answer
86 views

Should configuration synchronization be used only between cloned sites?

Can it be used to get configuration from one site to another site which is not a clone. eg: SiteX is installed using composer create-project drupal-composer/drupal-project:8.x-dev SiteX and ...
-2
votes
3answers
69 views

My Site goes to Maintenance spontaneously

My site goes to maintenance mode spontaneously almost every day. I am advised by users. Everything works fine when I put it out of maintenance mode. Any explanation is welcome (Drupal 7.59)
-2
votes
1answer
204 views

need you advice how to build this website has the same views [closed]

The search info module is the common feature for all the airport1,2,3 with this requirement do I need to set up multisite for ariport1,2 ,3? Could any give some tips what should I use (drupal) to ...

15 30 50 per page