Account created on 29 June 2014, about 11 years ago
#

Merge Requests

More

Recent comments

🇨🇳China lawxen

With navigation enabled, Error with patch of #263 Add visibility control conditions to blocks within Layout Builder Needs work on Drupal11.2.2
Class "Drupal\layout_builder\EventSubscriber\SectionComponentVisibility" used for service "layout_builder.component_visibility_subscriber" cannot be found.

🇨🇳China lawxen

Oh, I didn't enable core navigation module, After enable it, All works like GinNavition. Wow

🇨🇳China lawxen

The new GinNavigation native support Multi-level left side menu. And looks very great. If use core navigation, We must rewrite all the same logic of GinNavigation did.

🇨🇳China lawxen

One reason being that the changes to _gin_is_active() would break the purpose of this method.

I have revert the change _gin_is_active and add active theme check in it.

🇨🇳China lawxen

@jurgenhaas Thanks for the detailed reply.
1. Gin is not friendly for subtheme
2. Gin/(Gin based Subtheme) not work with switch_theme

Reproduced step of 2:

  1. Install drupal11
  2. Install and enable switch_theme ^2.1
  3. Enable Gin and configue it use dark mode (Not necessary, Just to see the problem more intuitively)
  4. Config path '/admin/content' use Gin or Gin based subtheme
  5. By deault admin theme is Claro, The page /admin/content didn't display right
  6. Config Gin as admin theme, The page /admin/content get right
🇨🇳China lawxen

'drupal/memcache:2.x-dev@dev' still has the problem

🇨🇳China lawxen

Why not defining a different pricelist then?

If do this:
A lot of new price list wiil be created.
Group module need be introduced to group the dispersed price list. But this increases the complexity of the system.

🇨🇳China lawxen

#11 🐛 Enforce a single price for the same quantity tier per pricelist Active I don't really see the case for allowing that..

For these possible usage like #14 🐛 Enforce a single price for the same quantity tier per pricelist Active Do you sussgest to add the feature back? @jsacksick

🇨🇳China lawxen

Same sku && quantity with different price by conditional field of price_list_item like "Time period".
This is out use case. The commit confilct with it.

🇨🇳China lawxen

We have similar ajax problem when using commerce_ajax_atc when filer product name.
After some debug, I found it caused by this code
$form_state->setUserInput($view->getExposedInput()); in ViewsExposedForm
which missing trigger_element*** caused input of exposed views be replaced.

Below is our tmp fix solution

/**
 * Implements hook_form_views_exposed_form_alter().
 */
function MODULE_NAME_form_views_exposed_form_alter(array &$form, FormStateInterface $form_state, $form_id) {
  if ($form['#id'] == 'views-exposed-form-commerce-products-products') {
    /** @var \Drupal\views\ViewExecutable $view */
    $view = $form_state->get('view');
    $view_id = $view->id();
    $view_display = $view->current_display;
    if ($view_id == 'commerce_products' && $view_display == 'products') {
      $form_state->setUserInput($_GET);
    }
  }
}
🇨🇳China lawxen

I got the same problem, Detail:

SELECT node_field_data.langcode AS node_field_data_langcode, taxonomy_term_field_data_node__department.langcode AS taxonomy_term_field_data_node__department_langcode, node_field_data.published_at AS node_field_data_published_at, node_field_data.nid AS nid, taxonomy_term_field_data_node__department.tid AS taxonomy_term_field_data_node__department_tid
FROM
{node_field_data} node_field_data
LEFT JOIN {node__department} node__department ON node_field_data.nid = node__department.entity_id AND node__department.deleted = '0' AND (node__department.langcode = node_field_data.langcode OR node__department.bundle = 'article')
LEFT JOIN {taxonomy_term_field_data} taxonomy_term_field_data_node__department ON node__department.department_target_id = taxonomy_term_field_data_node__department.tid
INNER JOIN {node__category} node__category ON node_field_data.nid = node__category.entity_id AND node__category.deleted = '0' AND (node__category.langcode = node_field_data.langcode OR node__category.bundle = 'article')
WHERE (((node__category.category_target_id IN('10', '34333', '24', '23', '26', '19', '18', '27', '16', '13', '17', '14', '25', '48', '15', '20'))) AND (node_field_data.nid IN (SELECT tn.nid AS nid
FROM
{taxonomy_index} tn
LEFT OUTER JOIN {taxonomy_term__parent} th ON th.entity_id = tn.tid
LEFT OUTER JOIN {taxonomy_term__parent} th1 ON th.parent_target_id = th1.entity_id
LEFT OUTER JOIN {taxonomy_term__parent} th2 ON th1.parent_target_id = th2.entity_id
WHERE (tn.tid = '1263') OR (th1.entity_id = '1263') OR (th2.entity_id = '1263'))) AND (node_field_data.trash = '0')) AND ((node_field_data.status = '1') AND (node_field_data.type IN ('article')) AND (node_field_data.promote = '1'))
ORDER BY node_field_data_published_at DESC
LIMIT 9 OFFSET 0

After Delete the contextual filter, the speed faster several times.

SELECT node_field_data.langcode AS node_field_data_langcode, taxonomy_term_field_data_node__department.langcode AS taxonomy_term_field_data_node__department_langcode, node_field_data.published_at AS node_field_data_published_at, node_field_data.nid AS nid, taxonomy_term_field_data_node__department.tid AS taxonomy_term_field_data_node__department_tid
FROM
{node_field_data} node_field_data
LEFT JOIN {node__department} node__department ON node_field_data.nid = node__department.entity_id AND node__department.deleted = '0' AND (node__department.langcode = node_field_data.langcode OR node__department.bundle = 'article')
LEFT JOIN {taxonomy_term_field_data} taxonomy_term_field_data_node__department ON node__department.department_target_id = taxonomy_term_field_data_node__department.tid
INNER JOIN {node__category} node__category ON node_field_data.nid = node__category.entity_id AND node__category.deleted = '0' AND (node__category.langcode = node_field_data.langcode OR node__category.bundle = 'article')
WHERE (((node__category.category_target_id IN('10', '34333', '24', '23', '26', '19', '18', '27', '16', '13', '17', '14', '25', '48', '15', '20'))) AND ((node__department.department_target_id IN('1263', '70', '25981', '76', '116', '117', '62', '105', '72', '103', '78', '91', '99', '31431', '35625', '22973', '106', '75', '97', '126', '82', '83', '22968', '118', '80', '115', '22967', '69', '85', '108', '67', '95', '25606', '122', '92', '84', '114', '100', '65', '22972', '22257', '74', '66', '73', '119', '109', '124', '96', '64', '71', '107', '68', '104', '63', '90', '88'))) AND (node_field_data.trash = '0')) AND ((node_field_data.status = '1') AND (node_field_data.type IN ('article')) AND (node_field_data.promote = '1'))
ORDER BY node_field_data_published_at DESC
LIMIT 9 OFFSET 0
🇨🇳China lawxen

From my understanding,
Just set $settings['state_cache'] config, then drupal will cache the whole key_value table
Then the performance solved, nothing need do in this module.
So, can we make this issue as fixed?
@berdir

🇨🇳China lawxen

📌 [PP-1] Use cache collector for state Needs work has landed on Drupal10.3
How we can use it to solve the performance of this issue?

🇨🇳China lawxen

If it really and officially and permanently is available everywhere

I searched the Internet and didn't find official announcement about this.

🇨🇳China lawxen

Hi christianadamski, After launching 2 sites which using this module, there's no other sites needs map so far, so I haven't work on this module for a long time.
Feel free to do any change on this module directly, This module desperately needs your help to get more feature 😊.

🇨🇳China lawxen

"the $include_parameter can't get the "include" query parameter on the second request"-- Why is this?

I didn't look into it.

And the MR of https://git.drupalcode.org/project/jsonapi_include/-/merge_requests/28 is really just a temporary solution which shouln't be merged.

🇨🇳China lawxen

I can reproduced the problem with jsonapi_include enabled.

The jsonapi_inclue can't get the parameter on second request.
https://git.drupalcode.org/project/jsonapi_include/-/blob/8.x-1.x/src/Js...
$include_parameter = $this->requestStack->getCurrentRequest()->query->get('include');

🇨🇳China lawxen

I find my problem in #18 is caused by the include in jsonapi_defaults(submodule of jsonapi_extra), The default include in jsonapi_defaults won't take effect on the second request after clear the cache

🇨🇳China lawxen

^1.8 and 8.x-1.x (with no any patch) both has the problem of #17, Did anyone knows how to quick fix it?

🇨🇳China lawxen

Reroll (Merge request !4681) for 10.3.9

🇨🇳China lawxen

Hi jonathan1055.

are you saying that Scheduler could update "changed" to the actual time that the cron job is run

Yes

but it would have to be an option per entity type, and the default would be to use the publish_on time to maintain the existing behavior.

Agreed, we can make this function https://git.drupalcode.org/project/scheduler/-/blob/2.x/scheduler.module...

      // Set the 'changed' timestamp to match what would have been done had this
      // content been published via cron.
      if ($entity instanceof EntityChangedInterface) {
        $entity->setChangedTime($entity->publish_on->value);
      }

as an config condition

"But in most cases"

Sorry, we didn't make much survey, It that our several customers want to see the real change time of any scheduled entity.
The schedular module will clean the publish_on time on cron job, then schedular save the publish_on to the changed field. Our resolution is to build a new field to store the publish_on time. For our use cases, both publish_on time and real changed time is important information.

🇨🇳China lawxen

I got this problem
The comment by Wim Leers on #7 [PP-1] Disable CSRF token check for non-CSRF vulnerable authentication providers Needs work helped me find the root cause: Send jwt(Bearer token) and Basic Auth together. Thanks @Wim Leers

Remove Basic Auth and restart my postman, error disappeared.

🇨🇳China lawxen

A little change of #3, deletting the code of 'az_blob_gov_endpoint' => $config->get('az_blob_gov_endpoint'), which is not relevent with this issue, it make the patch can't be applyed.

🇨🇳China lawxen

Missing doc for this change of adding access_token in /user/loggin

I'm wondering which endpoint should I use to get jwt token
/user/loggin
or
/jwt/token

Muy use case is app(ios/android) use a only one account(like uid:20) to get content from rest api

🇨🇳China lawxen

in which version of Drupal did this work?

I can't remember the exact version.
When the issue is created, webform+Drupal9 works. webform+Drupal10 didn't work.

🇨🇳China lawxen

Let's change codemirror_editor to ^2.0 directly?

🇨🇳China lawxen

@grasmash Wonderful, I have added you as the maintainer. Do anything what you want directly.

🇨🇳China lawxen

@grasmash I haven't work on this module for a long time, Would you like to maintain this module.

🇨🇳China lawxen

I don't understand the solutions above.

Resaving the DER field config

🇨🇳China lawxen

@berdir It only happen on some special situation:
Example:
1. Reference field reference several node type
2. this field allow multivalue
3. this field use select2 widge without "autocomplete" option.
4. select 2 node of different node type.
5. Re-edit the content to reorder, move the last to the first, you will find it doesn't take effect.

🇨🇳China lawxen

I facing the problem of "The user specified as a definer "
Solving ti by resaving the DER field, it seems related with https://www.drupal.org/project/dynamic_entity_reference/issues/3099176 🐛 Errors when new entity types are added (in certain cases) RTBC

Production build 0.71.5 2024