🇵🇱Poland @tivi22

Account created on 5 November 2021, about 3 years ago
#

Recent comments

🇵🇱Poland tivi22

Thanks er.garg.karan for the patch. I needed to adjust it a little, but it worked fine for me.

🇵🇱Poland tivi22

hey, I have a very similar issue, but in my case, I cannot see published translation of article, when its original translation is unpublished. I'm using JSON:API together with the View Unpublished module.

This module provides view any unpublished content and view any unpublished {node_type} content permissions.

I'm basically using only the first one, which is assigned to couple of authenticated user roles (i.e. Content editor). Anonymous users have access to published content only.

I'm using Drupal as a content repository, in a decoupled approach, and the front-end is consuming data from Drupal via JSON:API by sending requests to Drupal without any authentication (as anonymous user).

I have two languages configured in Drupal and when I create i.e. an article in English (without publishing this translation) and then translate it to Danish (with publishing it)... when I go to /da/jsonapi/node/article I cannot see this published translation. Same is when using filters /da/jsonapi/node/article?filter[drupal_internal__nid]={nid}... but when I go directly to the article here /da/jsonapi/node/article/{uuid} then I get all the data, without any problems.

If I do it other way around, so I publish original English translation and unpublish additional Danish translation, then everything works as expected (English translations are visible on resource list, filters are working, Danish translations are not accessible, etc).

Long story short... if I don't publish original translation then any other published translation is not visible on the resource list (/da/jsonapi/node/article) - with or without using filters, but is visible when asking directly for it (/da/jsonapi/node/article/{uuid}).

Is there any workaround for this?

I was trying to use the hook mentioned in #7, but it didn't help, even in this form:

function mymodule_jsonapi_entity_filter_access($entity_type, $account): array {
  return ([
    JSONAPI_FILTER_AMONG_ALL => AccessResult::allowed(),
  ]);
}
🇵🇱Poland tivi22

Hey, could you please make this patch working with Drupal 10.2?

🇵🇱Poland tivi22

FYI I did a temporary solution and it works great in my case. All I did was providing custom CSS styles:

/* Layouts */
.js-lpb-component-list .lpb-layout:not(:first-child) {
  margin-top: 50px;
}

.lpb-layout > .field + .layout {
  margin-top: 20px;
}

/* Components */
.js-lpb-component {
  margin-bottom: 10px;
  border: 1px dashed #999;
}

.js-lpb-component:not(.lpb-layout) > .field {
  padding: 5px 15px;
}

.js-lpb-component:not(.lpb-layout) > .lpb-controls + .field {
  border-top: 1px dashed #999;
}

.lp-builder:not(.is-navigating) .js-lpb-component:hover .js-lpb-region:hover,
.lp-builder:not(.is-navigating) .js-lpb-component:focus-within .js-lpb-region:focus-within,
.js-lpb-component:hover .js-lpb-region,
.js-lpb-component:focus-within .js-lpb-region {
  outline-width: 0;
}

/* Controls */
.lpb-controls {
  opacity: 1;
  z-index: 50;
}

.lpb-controls:hover,
.lpb-controls:focus-within {
  z-index: 60;
}

.lpb-controls:not(.is-layout) {
  position: relative;
  box-shadow: none;
  background-color: #ededed;
}
🇵🇱Poland tivi22

Yep, I've just installed Layout Paragraphs module in ver. 1.0.0 and it works very well. Please, take a look at scr. Is it possible to restore this feature?

🇵🇱Poland tivi22

Thank you for the patch. Is it possible to make this label permanent/always visible (maybe in the top right corner, I think this feature worked in 1.x version)? In my case, the label displays only once and when I save a paragraph, it disappears (even when I don't fill any field).

🇵🇱Poland tivi22

I had the same need to open selected env always in a new browser tab, so I used a quick patch for this case. Maybe someone will find it useful.

🇵🇱Poland tivi22

Hi, is it possible to add a patch working with 2.0.3 version?

🇵🇱Poland tivi22

Hi, did you set this field enhancer both on server & client instances?

Production build 0.71.5 2024