All Questions

Filter by
Sorted by
Tagged with
2
votes
2answers
15 views

How can I use the core link field widget with title and URL in a custom form?

I want to add a link field to my custom form. Below is the code that I have been trying to use but no success. So can anyone let me know how to use core link field in a custom form in Drupal8? The ...
0
votes
0answers
7 views

Drush does not run command, but prints the php script

We have a special server that runs php5.x and relies on drush 5.x. PHP 7.0 is installed, but the sites on the server all run PHP5, because PHP7 breaks them. We have previously had drush 5 on it, but ...
2
votes
1answer
799 views

Group search result by content type

I am using apachesolr on my drupal 6 website for search. Now I wanted to use filter results by content type on search page. At first I was using a panel page as search page. Here I tried to use the ...
2
votes
2answers
12 views

How to automatically change a Content type field value based on Date field?

I'm using Drupal 7, I have a content type, where I have two fields for project allocation: Status(Active/Inactive) End Date If the "End date" is less than current date, then the "status field" ...
0
votes
0answers
11 views

It is correct to change unit_price of commerce_order_item programmatically under several conditions?

I am developing a module that allows you to select additional options for a product that is not a product or a purchase entity. It's like commerce_option but for D8. My inspirations come from Product ...
0
votes
2answers
413 views

Taxonomy filter exposed to user that dynamically only includes terms attached to currently published content

Background: a) Taxonomy: I have built as site that allows users to tag content of a particular content type with tags. The system started with a pre-existing taxonomy before any content was added, ...
0
votes
1answer
472 views

How to fix error Undefined index: parent in taxonomy_form_term_submit()?

I got below error on my site recently. Notice: Undefined index: parent in taxonomy_form_term_submit() (line 829 of /var/www/Sites/xxxxx/modules/taxonomy/taxonomy.admin.inc). I google it and find ...
20
votes
7answers
14k views

Disable register email notification

I have made a deep research over the web and I also tried a lot of alternative solutions, but I didn't find any solution to disable the email notification for new users. In my User Settings, I have ...
0
votes
1answer
19 views

Custom Content Entity Bundles - How to override class methods?

I created a Custom content entity type and one bundle of this entity type. The Custom content Entity is presented as PHP-Class. The entity bundle is defined in a configuration file. I created the ...
1
vote
1answer
351 views

views displaying node reference fields

Will the view chosen (in the advanced settings) of a node reference in a content type get overridden by another view if the node reference field is shared between two (or more) content types? In more ...
0
votes
0answers
17 views

How to use media field with entity browser widget in a frontend theme?

I have created a media field in my content type. In the manage form display, I have selected entity browser as display instead of media library. When I open the node form as admin in an admin theme ...
2
votes
2answers
884 views

Can't get Ajax data sent to my PHP function

I recently took over an existing Drupal project and I tried to add a new PHP function (which works regularly) and link it with an Ajax query. There were already some in place that worked, and I wanted ...
1
vote
1answer
1k views

Views escapes HTML tags in node body

I'm creating a view that displays a few fields from a specific content type. Among the fields is the trimmed nody body. The problem is that the HTML tags in the body are escaped and are visible as ...
0
votes
1answer
360 views

commerce multi stock locaton data storage

Im working on a new module that will store stock levels in multiple inventory locations. What is the "best" way to store the data? Im slow to just attach and array of key/values to the product object ...
0
votes
0answers
17 views

How can I create a menu item AND tabs in a view?

Building on How to create views tabs in D8? where the asker gets information on how to turn the different pages in their view into tabs, I would like to also add a menu item for my default tab in the ...
0
votes
3answers
329 views

How to make a page visible only to users with permission to use the administration theme?

I have created a basic page which I only want to be viewable by people who have access to the administration theme. I have given the page a path of admin/shipping-help but to my surprise the page is ...
0
votes
1answer
11 views

How to copy/clone menu of a node when clone with Entity Clone module?

When cloning a node using Entity Clone module, the menu link are not copied. As menu link item is created and managed on the node form level, there is no reference of the menu link item in the node ...
2
votes
2answers
1k views

How to display comments and comments form on custom node pages

I am new developing my first ever site in drupal. Along the line, due to the requirements of the project I had to create custom node pages (template files) instead of the default ones in drupal. For ...
0
votes
0answers
14 views

How do I print out the webform errors as a component?

How can I print out a submission error in a webform element using a token? Background. The webform errors are printed at the top of the page, away from the form. This problem is probably resolved in ...
0
votes
2answers
811 views

Drush cache-rebuild breaking menus

We have had an issue with an expanding menu on a drupal 8 website that stops working when the command drush cache-rebuild is used. MORE INFO ON ERROR: When triggered, the error causes menus set ...
0
votes
3answers
1k views

Create email link

How do I create an email link on my site that is automatically placed in a user's email facility. This is a feature on many web sites I visit and prefer that to a contact form.
0
votes
1answer
489 views

Flexslider carousel using template.php

Views with flexslider takes lot of times in rendering items/images. Situation is that I have more than 5 flexslider carousels on the front page. So I changed to go without view with flexslider. I am ...
0
votes
1answer
333 views

How to use 'use-ajax' class with pages created by controller?

I'm trying to use 'use-ajax' class to load a page inside a modal box. My Page is dynamically created using node id pass on my page controller My link looks like this Any idea on how can I achieve ...
0
votes
1answer
24 views

Get argument from current URL in twig to generate a link with that argument

I'm trying to get an argument from search page URL so that I can pass that argument to a link. For example I have this URL for a search results page: http://domain.com/site-search?search_api_fulltext=...
0
votes
1answer
15 views

How do I make a form field go back invisble after I uncheck a radio button?

I'm currently building a form where the goal is that the administrator will have to choose between 3 radio buttons. If one click on any of the radios, a specific field shows up (There are 3 fields set ...
0
votes
1answer
820 views

Why does the php code entered via my content editor not get executed and shown within comments only?

I want to use php code inside my content editor I already enabled the PHP Filter from module then selected Text Format : PHP code and "PHP evaluator" option is on but still it's not working I have ...
-1
votes
0answers
13 views

Custom module to process offline paymnents [closed]

I need to be able to process offline payments, i.e. I have a list of payments and need to set the order in question as paid in full. I tried using rules but failed to add an amount ("The selected data ...
0
votes
4answers
1k views

Add custom HTML into .views-row-1

How can I add some HTML code inside a specific row in Views Now is: <div class="views-row views-row-1"><span class="views-field views-field-title"> .... Would be: <div class="...
0
votes
0answers
10 views

Show all values from multivalued flag in one line in Views

I'm very new to drupal (~3 months). I'm creating a PSU site to manage project proposals. One of the pages I'm creating allows the user to view the submitted project proposal, flag/unflag as interest (...
0
votes
0answers
14 views

How can I have three categories where the first category would have seven sub-categories?

I am trying to create an education website. As I have mentioned in the title, my requirements are to add 3 main categories, the first category has 7 subcategories, each subcategory has 6 subcategories....
2
votes
1answer
507 views

cannot use some drush commands

I am running into some trouble with drush I can't pm-enable the modules I just downloaded with it. I did some research but none of the solution worked for me, most cases involved switching "localhost" ...
0
votes
1answer
364 views

Custom sort to preserve order of referenced nodes

I have a node type that references other nodes. When viewing node of Content Type A, I have set up a view that displays all references to nodes of Content Type B on a gmap. This is the code from a ...
3
votes
2answers
2k views

Implementing custom entity forms

In Making use of the admin UI, Step 3 - Implement the entity adding/editing form, it says that you need to implement "a" form with the ENTITY_TYPE_form() signature for add/edit/clone operations... ...
4
votes
1answer
727 views

Entity Reference field using View to Mask Autocomplete with Last Name

I've posted about this here as well: http://drupal.org/node/1906344 I'm trying to use an Entity Reference field to reference users with a last name field I created on a "Product Page" content type. ...
2
votes
3answers
2k views

Personal Contact Form Link

I am using Drupal panopoly. For a node type, I am able to display the content of the node and some profile information about the author. I used Contexts for this. However now, I want to display the ...
0
votes
1answer
348 views

How to add a tooltip popup containing social share widgets in a views table

I have a views table containing a number of columns, one contains a small icon. I would like to have a tool tip open (containing the usual share widgets: twitter & facebook) when the image is ...
-2
votes
2answers
183 views

Clone a node table while all cloned table cells have in-place changeable input placeholders [closed]

To help others and myself learn new human natural languages I want to create a program for translating phrases shared between generally all such languages ("basic phrases"). Although, using this ...
1
vote
1answer
9 views

Token Content Access blocks access for author too

I use the Token Content Access module to hide member created nodes from public view and allow them to share private links with private links (URL tokens). My problem is when a user restricts access ...
6
votes
3answers
525 views

View display plugin “entity reference” not using translation

UPDATE: This bug was just fixed in Issue 2174633 and Drupal v8.7.9 will no longer have this problem. For some of my entity reference fields I'm using "Views: Filter by an entity reference views" ...
3
votes
2answers
634 views

How to import taxonomy from Json format

I have taxonomy in Json file. I need import this file into Drupal into exist vocabulary.how can I import data from Json file to exist vocabulary?
1
vote
1answer
443 views

Preview template for node with custom template?

I have a custom content type, 'Article with Header' for which I have a custom twig template, 'page--article-with-header.html.twig', which manages the layout for this content type. When I preview the ...
-2
votes
0answers
17 views

I would like to display inline documents on custom View instead of downloading [closed]

I have a webform that is collecting data and files of type word documents and pdfs. I have a view that displays webform submission data along with uploaded files. When I can click on a file, it ...
1
vote
2answers
28 views

How to prevent certain users from adding (for example, a Node) to bookmarks with Flag Module

Flag Module >>> https://www.drupal.org/project/flag How to disable/prevent some Users (NOT Roles) from adding (for example a Node) to bookmarks? Maybe showing a message after clicking on the Boomark ...
2
votes
1answer
334 views

Show Taxonomy Terms belonging to search_api search result nodes

Using search_api (and search_api_solr) i have a view that shows nodes for (in this case) Organisations in a search_view. That works very nicely. Now, I would like to show a list of taxonomy terms ...
1
vote
3answers
447 views

How do I configure subdomain url as one.mysite.com/subdomain1

I am a Drupal Developer currently working on Drupal 7.15 multi domain site. In my site, I have already installed Domain module and configured the domains as: Main domain - mysite.com (say 1st level) ...
0
votes
2answers
421 views

How do I update the unit price of an order item on Add to Cart in Commerce 2.x?

I added an event subscriber for add to cart event. There I defined a function to react on add to cart event. Everything works fine as my eventsubscriber is being called. I want to update the unit ...
0
votes
0answers
22 views

How can I re-populate file_usage and file_managed tables?

I have a commerce website. I am also consuming a web service and creating corresponding products, including matching products with another table's rows. I have the below code. It ran several times and ...
0
votes
1answer
379 views

How to parse definition lists ckeditor?

I want to write definition lists with , and tags with drupal commons 3 in CKEditor. I am writing code directly (while I am in source mode) then switch to WYSIWYG and go back to source. CKEditor ...
1
vote
2answers
479 views

Using git to fetch changes from testing version to live website

I am maintaining and developing a Drupal website and have a testing/development version of the site in a subfolder of drupal instalation. I started to learn git and I am wondering about how could I ...
1
vote
1answer
476 views

Theme settings to include different PHP files into template

I'm trying to include a template section into another template under conditions based on the themes settings. page.tpl.php <header> <?php $theme_header_style = theme_get_setting('...

15 30 50 per page