๐Ÿ‡ญ๐Ÿ‡บHungary @Sweetchuck

Budapest
Account created on 18 May 2005, about 19 years ago
#

Merge Requests

Recent comments

๐Ÿ‡ญ๐Ÿ‡บHungary Sweetchuck Budapest

Why does the DownloadController::download() deals with the file serving?

Would not be easier just to redirect to the file URL, like this?
For all cases, not just for remote files.

class DownloadController {
  public function download(MediaInterface $media): Response {
    // Get the $file as usually.
    return new \Symfony\Component\HttpFoundation\RedirectResponse($file->createFileUrl());
  }

}
๐Ÿ‡ญ๐Ÿ‡บHungary Sweetchuck Budapest

I haven't check the whole functionality of the media_entity_download module, neither the #12 patch,
but no need for custom @EntityUsageTrack plugin,
just change the route name from media_entity_download.download to entity.media.media_entity_download,
and the EntityUsageTrackBase::findEntityByRoutedUrl() will take care of it.

๐Ÿ‡ญ๐Ÿ‡บHungary Sweetchuck Budapest

@catch and @smustgrave Issue category changed from Plan to Task, and the issue status is "Needs work", but what exactly the proposed solution?

If somebody wants to work on this, then where to start and a โ€žhow to implementโ€ guide would be useful.
For me the hints from comment #29 is not enough.

New functions will have to be typehinted
Schema additions will need a post_update hook (with test case)

๐Ÿ‡ญ๐Ÿ‡บHungary Sweetchuck Budapest

@DishaKatariya In comment #4 you mentioned a patch:

... I can't see the edit link even after applying the patch the results were same. ...

May I ask what kind of patch did you apply?

๐Ÿ‡ญ๐Ÿ‡บHungary Sweetchuck Budapest

I think screenshot Create-Article-DrupalPod (1).png from comment #8 was made with Claro.
That looks good.
There is an "X" button to remove and a "pencil" button to edit the media in the top-right corner of the image.
Everything in place and working.

---

I think screenshot Create-Article-DrupalPod.png from comment #6 was made with Olivero,
And it clearly shows that what the problem is.
The "remove" button is not an overlay icon in the top-right corner of the image. Which is not a problem itself.
The problem is that the edit button - "pencil" button - still wants to be an overlay icon in the top-right corner of the image according to the applied CSS, but the HTML markup of Claro is different than the HTML markup of Olivero.
That is why the "edit" button is not visible.

This CSS can't be used with Olivero.
https://git.drupalcode.org/project/media_library_edit/-/blob/80e9857aa7b...

Current CSS only works with Claro and Claro based themes.

I think a contrib module should work with default core themes without any problem.

---

A tester has to pay attention to this settings as well:

Turn off: "Use the administration theme when editing or creating content"
On the /admin/appearance page.

๐Ÿ‡ญ๐Ÿ‡บHungary Sweetchuck Budapest
๐Ÿ‡ญ๐Ÿ‡บHungary Sweetchuck Budapest

Sweetchuck โ†’ created an issue.

๐Ÿ‡ญ๐Ÿ‡บHungary Sweetchuck Budapest

Wow. That was quick. :-)
With EPT Core 1.4.2 it looks good. (Olivero and Claro)

๐Ÿ‡ญ๐Ÿ‡บHungary Sweetchuck Budapest

Is this project still active?

Short answer: No. Not really.

However I still would like to see native TypeScript files in core and contrib modules, but there is no out-of-box tooling for that. (I started to work on the tooling, but not even close)
Lot of thing has changed in core and in the TypeScript ecosystem since I started this project,
for example typings/typings become deprecated.

I am curious if this could be updated for Drupal 10.

If you think it would be useful to update the *.d.ts files to the latest 10.x or 11.x, then may be I can find some free time for that.

Are the ported JavaScript files done using a tool or were they all done by hand? Could they be regenerated if done with a tool?

I wrote it manually.
Back then there were no such a tool that I knew of.
It took some time, but at least I got very familiar with the core's JS API :-)
I haven't checked it, but very likely nowadays there are more than one tool for this task.

There is a related project.
https://www.drupal.org/project/typings_token โ†’

๐Ÿ‡ญ๐Ÿ‡บHungary Sweetchuck Budapest

I still don't understand why do you (or mahyarsbt) need the ownership.

What can you do with the ownership that you can't with patches or merge requests?

๐Ÿ‡ญ๐Ÿ‡บHungary Sweetchuck Budapest

@apaderno I would like to see a patch or a merge request first.
Somebody, who never contributed to the project before comes out of blue and wants the ownership and I am forced to do so?

I am confused.
@mahyarsbt said:

to publish my new Drupal 10 Moment JS module.

@apaderno said:

the project will be replaced with a different one.

๐Ÿ‡ญ๐Ÿ‡บHungary Sweetchuck Budapest

I have bad experience โ†’ in transfer ownership of a project.
Your d.org profile looks trustworthy, but I still ask you to send merge requests first.
If you want me to open an "3.x" branch for D10, I'll do it.

๐Ÿ‡ญ๐Ÿ‡บHungary Sweetchuck Budapest

Patch #5 took care of three occurrences

  1. ActiveLinkResponseFilter
  2. RssResponseRelativeUrlFilter
  3. ResourceResponseValidator

Patch #29 for an unknown reason do nothing with ResourceResponseValidator.

๐Ÿ‡ญ๐Ÿ‡บHungary Sweetchuck Budapest

I ran into a very similar issue.

\Drupal\jsonapi\Eventsubscriber\ResourceResponseValidator line 104

str_contains(): Passing null to parameter #1 ($haystack) of type string is deprecated

$response->headers->all() =

[
  'cache-control' => ['no-cache, private'],
  'date' => ['bla bla'],
  'content-type' => [null],
  'x-drupal-dynamic-cache' => ['UNCACHEABLE'],
];
๐Ÿ‡ญ๐Ÿ‡บHungary Sweetchuck Budapest

datalist also can be used for "range" inputs

<label for="tick">Tip amount:</label>
<input type="range" list="tickmarks" min="0" max="100" id="tick" name="tick" />
<datalist id="tickmarks">
  <option value="0"></option>
  <option value="10"></option>
  <option value="20"></option>
  <option value="30"></option>
</datalist>

https://developer.mozilla.org/en-US/docs/Web/HTML/Element/datalist#range...

๐Ÿ‡ญ๐Ÿ‡บHungary Sweetchuck Budapest

With that implementation how can you re-use the same datalist for multiple textfields?

๐Ÿ‡ญ๐Ÿ‡บHungary Sweetchuck Budapest

@AnyBody I think that contrib module implements the required functionality in a wring way.

datalist != textfield

  1. https://git.drupalcode.org/project/datalist/-/blob/1.0.x/src/Element/Dat...
  2. https://developer.mozilla.org/en-US/docs/Web/HTML/Element/datalist
๐Ÿ‡ญ๐Ÿ‡บHungary Sweetchuck Budapest

I am not sure about the comments and the deprecation message.

๐Ÿ’ฌ | DruxtJS | Multisite support
๐Ÿ‡ญ๐Ÿ‡บHungary Sweetchuck Budapest
๐Ÿ’ฌ | DruxtJS | Multisite support
๐Ÿ‡ญ๐Ÿ‡บHungary Sweetchuck Budapest

Hello

I am also interested in the multi-site configuration.
The API connection looks good to me, but I have issues with the files proxy.
I tried to change the settings based on YouTube videos and this documentation
https://druxtjs.org/guide/proxy but with no luck.
And I also tried several other random values that I could think of.

What are the correct values for druxt/proxy if the public files are available here http://example.com/sites/foo/files?

None of the following works.

export default {
  druxt: {
    baseUrl: 'http://example.com/',
    proxy: {
      files: 'foo',
      files: 'sites/foo/files',
      files: 'http://example.com/sites/foo/files',
    }
  }
}

On the Nuxt frontend every IMG:src looks like this: <img src="/sites/default/files/bar.png">

๐Ÿ‡ญ๐Ÿ‡บHungary Sweetchuck Budapest

Give them a closer look.

For example this one: \Drupal\Core\Database\Query\Delete::execute

๐Ÿ‡ญ๐Ÿ‡บHungary Sweetchuck Budapest

Sweetchuck โ†’ made their first commit to this issueโ€™s fork.

๐Ÿ‡ญ๐Ÿ‡บHungary Sweetchuck Budapest

@krunalunadkat Have you checked the already existing MeregRequest before you uploaded the that *.patch file?

๐Ÿ‡ญ๐Ÿ‡บHungary Sweetchuck Budapest

For PHP 7.4 lines like this #[\ReturnTypeWillChange] are just a simple comment, it does nothing with it.
Same as this one

PHP 8.x handles this kind of comments in a special way.
https://www.php.net/manual/en/language.attributes.overview.php

๐Ÿ‡ญ๐Ÿ‡บHungary Sweetchuck Budapest

https://git.drupalcode.org/project/drupal/-/blob/9.5.x/core/lib/Drupal/C...

Drupal 9 with PHP 8.1 still has this problem.
Should I reopen this issue and change the "version" to "9.5.x-dev"?

๐Ÿ‡ญ๐Ÿ‡บHungary Sweetchuck Budapest

I can confirm this bug.

In this case the Track wizard progress in the URL by was set to "Page index (?page=2)" index,
To change it to "Page name (?page=contact)" name solved the problem.

Very likely the scenario to reproduce the problem is to have:

  1. Single page Webform (non multi-step)
  2. with settings: "Track wizard progress in the URL by" = "Page index (?page=2)"
๐Ÿ‡ญ๐Ÿ‡บHungary Sweetchuck Budapest

- What is the purpose of the test coverage report?
- It is intended to help identify areas of the system that have not been adequately tested, and to provide guidance on which tests should be conducted next.

Not everything has to be covered with Unit or Kernel tests.
Maybe a certain part of the code is covered with FunctionalJavascript test, but for that is very difficult to get coverage report.
It is also true if a file is 100% green, it doesn't mean that it is covered with right and meaningful tests.

Do we need to write test to cover the functions in any *.api.php files?
Can we write test to cover the functions in any *.api.php files?

If the answer is "no", then why are those files in the coverage report?

๐Ÿ‡ญ๐Ÿ‡บHungary Sweetchuck Budapest

Patch #2 works for me. RTBC++

๐Ÿ‡ญ๐Ÿ‡บHungary Sweetchuck Budapest

Same patch as it was in comment #1, but this one applies for 7.x-3.3

Production build 0.69.0 2024