ล่าสุด Drupal คำถามที่เกี่ยวข้อง

คะแนน 0
john Smith avatar
FieldItemList::getValue จะคืนค่าสตริงเสมอ แม้จะเป็นฟิลด์บูลีนก็ตาม
ธง gr

สมมติว่าฉันเพิ่มฟิลด์บูลีนที่กำหนดเองซึ่งมีจำนวนสมาชิกเป็น 1 ลงในประเภทเนื้อหา ฉันสร้างโหนดของประเภทเนื้อหานั้น ป้อนค่าสำหรับฟิลด์นั้น (ตัวอ ...

คะแนน 0
Alimba avatar
How to translate content but not backend interface?
ธง in

I'm trying to set up an English administrator back-end and a URL based front-end (anonymous user content) translation. I follow a guide on the subject, but I haven't been able to achieve what I wanted.

I also tried to set up /admin/config/regional/language/detection using various combinations of settings, but either I have the back-end in English along with the rest of the site, or everything is t ...

คะแนน 0
tonytheferg avatar
How to get access to a $form in hook_entity_view_display_alter?
ธง cn

In Drupal 9, I added a views_add_to_cart_form view mode to be able to render a product entity with only the Variations field formatted as add to cart form being displayed. That all works as expected, but I am trying to remove the quantity widget on the commerce add to cart form for that specific view display by using unset($form['quantity']);.

I am not sure if it is better to bring the view display infor ...

คะแนน 0
Filtering on child properties in GraphQL
ธง hu

I am using GraphQL to get a list of upcoming events. I am having trouble finding the correct way to filter on the date value which is a child of my date field.

The query, which works:

query getUpcomingEvents {
  nodeQuery(
    filter: {
      conditions: [
        {operator: EQUAL, field: "type", value: ["ain_event"]},
        {operator: EQUAL, field: "status", value: ["1"]} 
      ]
    }
  )
  {
   ...
คะแนน 1
Md Eqbal Ahmad avatar
Fatal error: Cannot redeclare Drupal\views\Routing\ViewPageController::getTitle()
ธง gh

I have updated Drupal 9.0.1 to 9.2.2 via Composer. After updating, I am getting a fatal error.

Fatal error: Cannot redeclare Drupal\views\Routing\ViewPageController::getTitle() in /var/www/html/docroot/core/modules/views/src/Routing/ViewPageController.php on line 98

drush updb outputs the following.

 -------- ------------------ ------------- ------------------------------------ 
  Module   Update  ...
คะแนน 0
fin avatar
แคชไม่ถูกต้องอย่างไร
ธง th
fin

การใช้รหัสต่อไปนี้ จะพิจารณาถังแคชทั้งหมดเมื่อทำให้ชิ้นส่วนเนื้อหาใช้ไม่ได้หรือไม่

$variable['#แคช'] => [
  'keys' => ['คีย์สตริงที่นี่'],
  'แท็ก' => ['แท็กสตริงทีà ...
คะแนน 2
Baud avatar
How to create a view filter which display nodes if "field1" - "field2"
ธง sa

I have a content type with 2 fields: field1 and field2

I would like to create a view filter which display node based on a calculation on those two fields.

The filter should display only nodes if field1 - field2 is lower then a given amount.

Here is my try: At the end of the code, I don't know how to create the query

 class Myfilter extends FilterPluginBase implements ContainerFactoryPluginInterface {

 ...
คะแนน 0
ACanadianCoder avatar
SOLR displays "submitted by username" only for the Article content type. How do I stop this?
ธง br

No matter what I do, I can't seem to remove the Submitted by [username] from popping up in my search results for the Article content type. I'm using the Apache SOLR module. If you visit the article page itself, I never actually display this information, so showing up on the search results page is confusing me.

When I go to manage fields for my search results, I've got the following for content (I r ...

คะแนน 0
Dorian Winterfeld avatar
วิธีที่ถูกต้องในการโหลดไลบรารี JavaScript คืออะไร
ธง ae

ฉันกำลังพยายามแสดงข้อมูลในแบบฟอร์มเป็นแผนภูมิเส้น ฉันใช้ Drupal 9 ใน Lando ฉันใช้แผนภูมิ 5.0.x กับโมดูลย่อย Highcharts ฉันติดตั้งไลบรารี Highcharts JS โดยใช้ผู้แต่ง นี่คืภ...

คะแนน 0
ฉันจะเปลี่ยนคลาสปลั๊กอินการแสดงผลได้อย่างไร
ธง vn

ฉันกำลังพยายามแก้ไขคำจำกัดความของปลั๊กอินการแสดงผลมุมมองเพื่อใช้คลาสที่กำหนดเองของฉันเอง ฉันใช้ hook_views_plugins_display_alter()แต่ดูเหมือนว่าจะไม่ถูกเรียกใà ...

คะแนน 0
Jean da Silva avatar
Cron กำลังทำงาน แต่ไม่บันทึกเอนทิตี
ธง cn

ฉันกำลังพยายามสร้าง hook_cron อย่างง่ายเพื่อเชื่อมต่อกับ API ภายนอก ส่งคืนข้อมูลบางส่วน และอัปเดตบางฟิลด์ในบางเอนทิตี ฉันกำลังสร้างสิ่งนี้เพื่อให้เข ...

คะแนน 0
Thiery avatar
วิธีรับค่าเดลต้าจากคอมโพสิตที่มีค่า ilimited
ธง vn

ฉันมีเว็บฟอร์มนี้พร้อมฟิลด์ผสมที่ฉันเพิ่มไฟล์และฟิลด์ที่ฉันเพิ่มตัวเลข พิมพ์

สิ่งที่ฉันต้องการคือการใช้โทเค็นเพื่อเปลี่ยนชื่อไฟล์โดยป้อนตัวเลขà ...

คะแนน 0
khadidja avatar
ตัวตัดคลาส Views Infinite Scroll หายไปเมื่อกรองโดยใช้ facets เปลี่ยนสไตล์ CSS ของฉัน
ธง cn

ฉันมีเพจที่มี css แบบกำหนดเองที่ใช้ display:grid สำหรับเอาต์พุตเนื้อหาจากมุมมองของฉัน ขีดจำกัดที่ฉันมีสำหรับผลลัพธ์การดูของฉันคือ 30

เนื่องจากการเลื่ ...

คะแนน 1
scaffolding avatar
Add a hero image and text when a node goes from unpublished to published
ธง es

I'm trying to add a hero image and text when a node goes from unpublished to published. The things include:

  1. Add an image from my media library to a media field on the node
  2. Add a page title to the node, drawing upon a field already saved on the node

I'm attempting to build a hook on hook_node_update() but it's not working. I'm not sure why.

The code I am using, part of the running_event_adding_header.mod ...

คะแนน 1
shelane avatar
ฉันจะบังคับใช้คำนำหน้าชื่อเครื่องเริ่มต้นได้อย่างไร
ธง cn

เรากำหนดให้ผู้ดูแลไซต์สร้างเว็บฟอร์มใหม่โดยมีชื่อเครื่องขึ้นต้นด้วย งาน_. (นี่เป็นเพราะการตั้งค่าการเพิกเฉยต่อการกำหนดค่าเป็นละเว้น เว็บฟอร๠...

คะแนน 0
hotwebmatter avatar
ดูเมนูทางลัดที่มีเงื่อนไขอนุกรมวิธานพี่น้องเท่านั้น
ธง nr

ฉันกำลังใช้ ดูเมนูข้าม ด้วย Drupal 9

โหนดถูกแท็กด้วย a ซอฟต์แวร์_เวอร์ชัน อนุกรมวิธานลำดับชั้นตามรูปแบบนี้:

âââ ฟู
â âââ 0.1.0
€ 0.2.0
âââ บาร์
€ 0.3.0
â âââ 0.3.1
€ 0.4.0
âââ บาซ
 ...
คะแนน 0
ตัวแปรที่ส่งผ่านไม่ใช่อาร์เรย์หรือวัตถุ
ธง cn

พยายามย้ายรูปภาพโดยคัดลอกจากแหล่งภายนอก:

id: custom_news_migration_with_external_images_1
ป้ายกำกับ: การย้ายข่าวแบบกำหนดเองพร้อมตัวนำเข้ารูปภาพภายนอก
แหล่งที่มา:
  ปลั๊กอิภ...
คะแนน 0
awm avatar
สร้างบริบทแคชสำหรับผู้ใช้ที่ไม่ระบุตัวตนตามช่วง ip
ธง mx
awm

ฉันมีแบบฟอร์มภายในบล็อกแบบกำหนดเองที่แสดงในหน้าแรกของไซต์ Drupal 9 บน Acquia Cloud ฉันต้องการให้มีการแสดงผลที่แตกต่างกันสำหรับผู้ใช้ที่มาจากช่วง ip ที่กำห ...

คะแนน 2
metalac avatar
จำเป็นต้องเพิ่มหลายบทบาทในไฟล์ routing.yml
ธง us

ฉันต้องการกำหนดหลายบทบาทในไฟล์ routing.yml ของฉัน :

ความต้องการ: _role: "['บทบาท 1', 'บทบาท 2', 'บทบาท 3']"

นี่คือสิ่งที่ฉันมีอยู่ในขณะนี้และใช้งานไม่ได้

ใครช่วยบอกฉัน ...

คะแนน 0
Asatur Vardanyan avatar
ฟีด: นำเข้าช่องที่ซ้อนกันของ JSON
ธง jp

ฉันใช้ feeds และ feeds_ex modules และ JSON Path parser เพื่อนำเข้าข้อมูลจาก endpoint นี่คือข้อมูลที่นำเข้า:

{
  "สินค้า": [
    {
        "รหัส": 103839858696,
        "title": "\"โอกาสทั้งหมด\": White Pennsylvania Runaways, 1750-1762",     
     ...
คะแนน 0
Andrew Perriman avatar
ฉันจะตั้งค่าบล็อกมุมมองที่กรองตามบริบทของฟิลด์ที่รวมอยู่ในย่อหน้าได้อย่างไร
ธง in

ฉันมีเนื้อหาสองประเภท (เนื้อหาก, เนื้อหาB) ซึ่งทั้งคู่ใช้ย่อหน้าเดียวกัน (ย่อหน้าของฉัน) เป็นฟิลด์ประเภท âการแก้ไขการอ้างอิงเอนทิตีâ

ย่อหน้าของ ...

คะแนน 0
bigboy avatar
รูปแบบนามแฝงของโหนด URL ตามการจัดหมวดหมู่ทำงานไม่ถูกต้อง
ธง gu

ฉันมีอนุกรมวิธานชื่อหมวดหมู่ที่มีสองคำ: ข่าวและบทความ

คำศัพท์ของบทความมีนามแฝง URL ที่กำหนดเอง - /มีประโยชน์.

เว็บไซต์ได้รับการอัปเกรดจาก D7 เป็น D ...

คะแนน 0
how to add javascript to an article?
ธง cn

just installed a stock Drupal 9.2.2 core, trying to create an article with the /node/add/article editor, how do i add javascript to the article? enter image description here

คะแนน 0
จะนำเข้าเนื้อหาที่มีคำศัพท์อนุกรมวิธานหลายรายการพร้อมคำแปลได้อย่างไร
ธง kr

ฉันมีไฟล์ CSV แบบนี้

id, ชื่อเรื่อง, เนื้อหา, แท็ก, ชื่อภาษาดัตช์, เนื้อความภาษาดัตช์, แท็กภาษาดัตช์
1,เนื้อหา1,คำอธิบาย,tag1;tag2,เนื้อหาภาษาดัตช์1,คำอธิบายภา ...
คะแนน 0
kazah avatar
How to change the display order of webform elements (conditional logic)?
ธง aq

How to change order (weight) of webform elements in conditional logic based on the visibility of other elements?

My webform example, six fields:

  1. Open field A? (Checkbox yes/no)

  2. Field A is hidden (textfield, hidden because current-page-node-field-a is null)

  3. Open field B? (Checkbox yes/no)

  4. Field B is hidden (textfield, hidden because current-page-node-field-b is null)

  5. Open field C? (Checkbox yes/ ...

คะแนน 0
Joost avatar
ฉันไม่สามารถปิดใช้งานการแคชได้อย่างสมบูรณ์ในระหว่างการพัฒนา
ธง jp

ฉันกำลังพัฒนาเว็บไซต์ Drupal 9 ใหม่ ฉันสร้างโมดูลที่กำหนดเองจำนวนหนึ่งสำหรับสิ่งนี้ แต่ด้วยเหตุผลบางประการ การเปลี่ยนแปลงที่ฉันทำในโมดูลระหว่างก ...

คะแนน 0
beltouche avatar
How to add a secondary Ajax submit to a regular node form?
ธง cn

I'm trying to add an Ajax submit to a regular node edit form (Drupal 9). I'm using Field Groups so that there's a series of tabs, and I've added a pair of "buttons" (Right now they're just markup <div>s, but I could change them to real buttons if that's recommended) that users can use to move forward and back through the tabs with some Javascript.

The ask now is that each time the tab focus changes ...

คะแนน 2
Kevin avatar
การดีบักส่วนหัว "UNCACHEABLE"
ธง in

เรามีไซต์ที่ไม่ได้แคชหน้าแรกและมีส่วนหัว:

x-แคช: มิส, มิส
x-แคชฮิต: 0, 0
x-content-type-options: nosniff
x-drupal-dynamic-cache: ไม่สามารถเข้าถึงได้

ฉันจำกัดขอบเขตนี้ให้แคบลงถึงเนื้อหาà ...

คะแนน 0
วิธีบันทึกตัวกรองตามบริบท (อนุกรมวิธาน) ที่ใช้กับประเภทเนื้อหาหนึ่งไปยังอีกประเภทหนึ่ง
ธง mg

ฉันค่อนข้างใหม่สำหรับ Drupal และฉันกำลังสร้างไซต์ที่ผู้ใช้จะสามารถกรองเนื้อหาโดยใช้อนุกรมวิธาน (เช่น สถานที่ ช่วงราคา ฟรี/ถูก/แพง เป็นต้น) ฉันต้องกà ...

คะแนน 0
How to show error on screen after failling a webservice call on Webform submitForm?
ธง in

I made a custom handler for one of my webform to call a service when the form is submitted. Here is my code. It is working when the service return a response with status code = 200 but I cannot find a way to notify the view when an error is raised by the webservice. I would like to show a modal with an error message but cannot find how to do this.

class CRMWebformHandler extends WebformHandlerBase { ...

พลังที่น่าทึ่งของคำถาม

วันทำงานส่วนใหญ่ของผู้บริหารหมดไปกับการขอข้อมูลจากผู้อื่น เช่น การร้องขอการอัปเดตสถานะจากหัวหน้าทีม หรือการซักถามเพื่อนร่วมงานในการเจรจาที่ตึงเครียด แต่ไม่เหมือนกับมืออาชีพ เช่น ทนายความ นักข่าว และแพทย์ ที่ได้รับการสอนวิธีถามคำถามซึ่งเป็นส่วนสำคัญของการฝึกอบรม ผู้บริหารเพียงไม่กี่คนที่คิดว่าการตั้งคำถามเป็นทักษะที่สามารถฝึกฝนได้ หรือพิจารณาว่าการตอบคำถามของตนเองจะทำให้ การสนทนามีประสิทธิผลมากขึ้น

นั่นเป็นโอกาสที่พลาดไป การตั้งคำถามเป็นเครื่องมืออันทรงพลังที่ไม่เหมือนใครในการปลดล็อกคุณค่าในองค์กร: กระตุ้นการเรียนรู้และแลกเปลี่ยนความคิดเห็น กระตุ้นนวัตกรรมและการปรับปรุงประสิทธิภาพ สร้างสายสัมพันธ์และความไว้วางใจระหว่างสมาชิกในทีม และยังช่วยลดความเสี่ยงทางธุรกิจได้ด้วยการเปิดโปงหลุมพรางและอันตรายที่คาดไม่ถึง

สำหรับบางคน การตั้งคำถามเกิดขึ้นได้ง่าย ความอยากรู้อยากเห็นตามธรรมชาติ ความฉลาดทางอารมณ์ และความสามารถในการอ่านใจคนทำให้พวกเขาถามคำถามในอุดมคติที่ปลายลิ้นของพวกเขา แต่พวกเราส่วนใหญ่ไม่ถามคำถามมากพอ และเราไม่ได้ตั้งคำถามด้วยวิธีที่เหมาะสมที่สุด

ข่าวดีก็คือโดยการถามคำถาม เราจะพัฒนาความฉลาดทางอารมณ์ของเราโดยธรรมชาติ ซึ่งจะทำให้เราเป็นนักตั้งคำถามที่ดีขึ้น ซึ่งเป็นวัฏจักรที่ดี ในบทความนี้ เราดึงข้อมูลเชิงลึกจากการวิจัยด้านพฤติกรรมศาสตร์เพื่อสำรวจว่าวิธีที่เรากำหนดกรอบคำถามและเลือกตอบคำถามของเราสามารถมีอิทธิพลต่อผลลัพธ์ของการสนทนาได้อย่างไร เราให้คำแนะนำในการเลือกประเภท โทนเสียง ลำดับ และกรอบคำถามที่ดีที่สุด และสำหรับการตัดสินใจว่าจะแบ่งปันข้อมูลใดและมากน้อยเพียงใดเพื่อเก็บเกี่ยวผลประโยชน์สูงสุดจากการโต้ตอบของเรา ไม่ใช่แค่เพื่อตัวเราเองแต่เพื่อองค์กรของเรา