Stack Exchange Network

Stack Exchange network consists of 175 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 [8]

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
1answer
22 views

Contextual filter in URL via Twig [duplicate]

Does somebody of you know how to build a link as described in #9 in https://www.drupal.org/project/views_contextual_filter_query/issues/2686467#comment-10983075 I tried it this way <a href="node/{...
0
votes
0answers
17 views

Adding local task tabs to node display for specific content type

I'm creating a custom module (it's called cil_meet) which adds two content types (organisation and room). On an organisation node I want a local task tab (next to 'view' and 'edit') of 'add room', ...
0
votes
0answers
28 views

Problem updating drupal core

I'm trying to upgrade an older version 8.5 of drupal core to 8.6.14. I get the following message when I refresh or try to do the update.php on my site: Warning: Class Drupal\Core\Extension\...
1
vote
1answer
55 views

Change title of certain paragraphs in a form

Please see the attached pictures. In one of my projects I have a taxonomy, which users can edit and add data. It has multiple tabs (see picture one) and each tab has multiple fields in which ...
0
votes
0answers
29 views

how use httpclient for a GET request and this request have a redirect?

I try to use a API for a logout process, in the documentation of the api give a endpoint for it "https://example.com/logout", this is a GET request, i need to send a token, state , and url_post_logout ...
0
votes
1answer
17 views

Display multi-value entity reference field in node edit form as draggable?

Is there a way to display a multi-value entity reference field as a draggable widget in a node edit form? I'm looking for the exact same behavior that a multi-value image field has by default. I would ...
-1
votes
0answers
11 views

how to create a circular diagram with links to content [closed]

In a Wordpress website i saw a circular diagram of which each elements linked to specific content in the site. The diagram is responsive, meaning it resizes not only the circle but also resizes the ...
0
votes
0answers
16 views

Alternative to hook_node_access for Media entities (Drupal 8.6)

It seems that hook_node_access does not fire for Media entities. Is there an alternative hook, or some way of forcing Media to use hook_node_access?
0
votes
2answers
50 views

Switch between View Modes from the URL

Under the manage display for the user profile /admin/config/people/accounts/display, I have 4 view modes as below: Default Profile (Machine name: user.profile) Company (Machine name: user.company) ...
2
votes
0answers
39 views

EntityQuery with node_access module compatibly

I have installed node_access for maintaining access per node. I need to write a sql query using entityQuery service and display only those nodes which respect node_access configuration per node. I am ...
0
votes
1answer
17 views

Menu migration update error

I migrate the menu by this drush command: drush migrate-import --update page_menu and .yml config: id: page_menu label: 'Page menu migration.' migration_group: pages source: plugin: csv path: ...
-1
votes
0answers
8 views

Multiple tabs filter for custon node listing page

I have created a custom route to display all nodes of a particular content type.just above the node listing there are 6 taxonomy term(referenced to nodes) in form of html tabs available for filtering ...
0
votes
0answers
21 views

Updating a module results in a Mismatched entity and/or field definitions with live server only

Installing updates produces Mismatched entity and/or field definitions, yet only within the live server instance. Local environment works as expected. It first happened with the update 8001 in both ...
-3
votes
0answers
25 views

File upload for multiple pdf files not working [closed]

I am using the file upload field for multiple pdf files to upload in my content type "X". Content type "X" also contains a custom ajax fields. But my file upload is not working at all only one file is ...
1
vote
0answers
44 views

Trouble Hiding Regions When Blocks Are Empty

Having trouble seeing why my regions render when I think they shouldn't... page.html.twig: {% if page.region %} {{ page.region }} {% endif %} region.html.twig: {% if content %} <div id="" ...
0
votes
1answer
23 views

Can a Drupal Site Administrator view contents of settings.php or some other file in file system?

We are using Drupal 8.6.3. I want to store some configuration in file system (in settings.php or some other file outside Web Root). Can a Drupal Site Administrator view that configuration? What ...
0
votes
0answers
43 views

How to have a button to open a modal popup from a table form?

I have a custom entity (contract_subscription) created in a custom module (amap) by a bunch of BaseFieldDefinition, one of which being a file field: $fields['file'] = BaseFieldDefinition::create('...
0
votes
0answers
12 views

Is there an alternate way to fix mismatched field definitions when entity-updates doesn't work?

In my status report, I see... Mismatched entity and/or field definitions The following changes were detected in the entity type and field definitions. Content The node.field_profile_phone field ...
0
votes
1answer
24 views

How can I render HTML tags in a variable in a twig template?

I have a variable in my twig template called description. The variable is a string with an html em tag in it. When I go to the webpage to view the field, the html em tags are stripped out of the ...
0
votes
1answer
15 views

Can't add iframe to paragraph - iframe is stripped for attributes

I have a problem with adding an iframe to a paragraph. In Text formats and editors, I have checked "Limit allowed HTML-tags" and then added <iframe> to allowed tags. But when adding an iframe ...
1
vote
0answers
27 views

How to hide paragraph with data?

I am using paragraph module. Named Address: It has fields address 1, address 2, state, country. (User can add unlimited addresses) While creating the node, I have added 2 address. While edit, I ...
-2
votes
0answers
17 views

How can I get XML/JSON from a third-party API and send it to the client? [closed]

We are trying to write our module on D8, whose tasks include: 1) get data from a third-party API (repeat the operation every X-minutes); 2) save them to a JSON file on the server; 3) upon request from ...
-2
votes
0answers
28 views

How to set permission for action of new module [duplicate]

How can I set permission for action of new module? I have a new module and I want to limit some actions and some menu or link in my view and controller by roles of users. Management roles like ...
0
votes
1answer
26 views

How to open a node edit form in an overlay (modal window) in Drupal 8

I have a view with nodes of type 'tasks'. I want to easily view and edit these tasks by using a minimized overlay. When I click on a task title in the view, it needs to open in an overlay. In D7 this ...
0
votes
0answers
29 views

How can I replace static file and media links in content with their equivalent entity references?

I imported content from another system. So, for example, the body has typical html, like this: <img src="/images/image.jpg /> All of the media assets that are referenced as static html, those ...
0
votes
0answers
11 views

how can i get list of commerce order purchased by specific user programatically?

how can i get list of commerce order purchased by specific user programatically? i want to create function for it so that other developers can use it in further development by simply calling that ...
0
votes
0answers
17 views

How can I get an image form to maintain image order after deleting one?

I have a content type with a field for images. The field accepts multiple images and after I upload several, I re-arrange them to a desired order. After re-arranging them, I can enable "Show Row ...
0
votes
1answer
49 views

Where can I set cardinality for a custom field?

I have a custom field defined in a module I am writing and it works correctly; but the default cardinality is unlimited and I want to limit it to 1. I am sure I need this somewhere: ->setCardinality(...
0
votes
0answers
33 views

Is there a way to set date for scheduled unpublishing?

I check in many place but I want unpublish a node after a time like unpublish after 1 day, after 1 year. I try with Rules and Scheduler with the action Rules "set date for scheduler unpublishing" but ...
0
votes
0answers
37 views

Can't place a custom block

After adding a block file to src/Plugin/Block I can't add the block on the Block Layout admin page. When I filter by block name I can see it, but then when I try to place it I can't get to the ...
0
votes
1answer
31 views

HttpFoundation Request POST parameters

From VueJS, I am sending a POST HTTP request to my Drupal 8 controller. Here is my Controller: <?php namespace Drupal\mymodule\Controller; use Drupal\Core\Controller\ControllerBase; use Symfony\...
0
votes
0answers
14 views

Is it possible to store a query calculation result in a search index?

I am counting nodes of a specific type associated with terms with this query: $connection = \Drupal::database(); $query = $connection->select('taxonomy_index', 'ti'); $query->join('...
0
votes
0answers
16 views

8 - Ubercart's add to cart external link not working when triggered from external domain

When trying to add a product to cart from an external domain the site gives error. The add to cart url looks like this on the external site which has a button with the link below: https://...
0
votes
1answer
40 views

Add site branding to external site

Maybe I'm asking the wrong questions on google, but I can't seem to find a solution to what I'm trying to accomplish. We've created a Drupal 8 site and we need to add the existing header and footer ...
0
votes
1answer
44 views

I can see the changes I made (as an administrator) but as an anonymous user, I can't

Have you had any problems like this before? I appreciate your help. When I'm an admin and update a node (custom module), I can see the changes I made (as an administrator). However, when I'm an ...
0
votes
1answer
24 views

Display related media entities

We are using the Basic Page content type and it has an Entity Reference field (field_document) that points to the Document (Media bundle), which has a field_document_tag (taxonomy term field). The ...
1
vote
1answer
57 views

How to access raw data in twig template using views table format

I use a table format view to display a list of articles article-list using draggable views to allow editors to order the list. I customize the content of rows depending on a boolean field is_header ...
0
votes
0answers
7 views

How can I bulk manage taxonomy parent child relationships?

Using the Migrate API and the explode and entity generate plugins from Migrate Plus, I was able to bring in a couple thousand taxonomy terms. They were listed in the source as: term1/term2/term3/etc ...
1
vote
0answers
7 views

How can I use Migrate API to migrate taxonomy with an unknown level of parent child relationships in tact?

I have a JSON file with an entry that looks like this: "taxonomy": "abc/historical_controls/abc2000_2013" In my YML file I have it mapped like this: field_abc_asset_taxonomy_auto: - ...
0
votes
0answers
37 views

The “paragraphs_type” entity type did not specify a access handler

When i try to access paragraph type page i get following error. Drupal\Component\Plugin\Exception\InvalidPluginDefinitionException: The "paragraphs_type" entity type did not specify a access handler ...
0
votes
0answers
28 views

Preprocess Menu Link Independent of menu.html.twig?

I am hoping there is a way to alter a menu link independent of menu.html.twig Motivation is this example from Bootstrap theme menu.html.twig: {% set link_title = item.title %} {% set link_title %}{{ ...
0
votes
1answer
27 views

How to download from private// following a link?

I have a custom entity (contract) created in a custom module (amap) by a bunch of BaseFieldDefinition, one of which being $fields['file1'] = BaseFieldDefinition::create('file') ->setLabel(t('...
0
votes
1answer
21 views

How to fetch nearest node based on geofield?

How to fetch nearest node based on location geofield,i want to fetch nearest node based on longitude and latitude of my current location ,for this i have installed and configured geolocation field ...
0
votes
2answers
27 views

How to reuse the same custom template in Ajax callback

I am currently trying to display a list of nodes with a custom form containing taxonomy dropdowns (placed above node list) to filter out the contents. Now, on page load all content is displaying well ...
-2
votes
0answers
14 views

Understanding how drupal behaviors and drupal settings work [duplicate]

as i am pretty new to drupal and i recently got introduced to drupal behaviors, can anyone help me with passing a variable & its value in Drupal behaviors settings. Thanks in advance!
0
votes
0answers
28 views

How to set visibility configurations and third party setting in the block programmatically?

/** * Create Custom solutions blocks for Super Category and Category Pages. */ function custom_blocks_update_8008() { $values = [ 'uuid' => '7760fb2f-5235-4390-a91b-32568da6b001', '...
0
votes
1answer
33 views

Add/List/Edit paragraphs while add/edit node

I have installed paragraph module. I have paragraph called Address contains relevant info. It is attached to node. Per page/article I have more than 100 address. If I use default Paragraph Classic ...
0
votes
1answer
12 views

D8 VBO - Pass selected values to node add form

I have a view of nodes. I'd like to be able to select rows (thinking VBO is the best) and pass those selected nodes to a form (specifically /node/add/payments) to pre-populate entity references. ...
-1
votes
0answers
37 views

Menu Link Routes via Menu UI

One of my favorite things about symfony was the routing system. Which is now in drupal. I don't have to create a hard coded link to '/contact-us.' I can just create one to the route name {{ path('...
0
votes
0answers
23 views

Missing frontpage, unable to create views and error:Notice: Undefined index entity_type

With the following symptoms, any ideas on how to repair the issue? Unable to edit frontpage (it is visible in views list) Logged error message begins with: Notice: Undefined index: entity_type in ...