sweetchuck → created an issue.
Has anybody tried this with a sticky table header?
What if "--server" is not an option? I think it should be an argument.
function x(array $server_ids, array $options = [...])
drush my-command --type='json' 'my_server_id_01' 'my_server_id_02'
Or Drush have a native support for comma separated values. I handles it as CSV.
function x(string $server_ids, array $options = [...])
drush my-command --type='json' 'my_server_id_01,my_server_id_02'
sweetchuck → created an issue.
sweetchuck → created an issue.
Why is the i
(case-insensitive matching) modifier is there in the file selector regexp?
/^([a-z0-9_-])+\.stories\.twig$/i
https://git.drupalcode.org/project/storybook/-/blob/360a91f491f4015f7266...
It matches to a file name like this as well: fooBar.stORies.tWIg
Then the validateTemplatePath will throw an exception.
But it will allow this one: fooBar.stories.twig
Is this the desired behavior?
I am not fully aware of the requirements, but I think the current *.stories.twig files discovery is a little bit over complicated in the \Drupal\storybook\Drush\Commands\StorybookCommands::generateAllStories command.
Current solution. Which uses a custom RegexRecursiveFilterIterator.
$flags = \FilesystemIterator::KEY_AS_PATHNAME
| \FilesystemIterator::CURRENT_AS_FILEINFO
| \FilesystemIterator::SKIP_DOTS;
$directory_iterator = new \RecursiveDirectoryIterator($directory, $flags);
// Detect "my_component.component.yml".
$regex = '/^([a-z0-9_-])+\.stories\.twig$/i';
$filter = new RegexRecursiveFilterIterator($directory_iterator, $regex);
$it = new \RecursiveIteratorIterator($filter, \RecursiveIteratorIterator::LEAVES_ONLY, $flags);
could be replaced with this:
$it = (new Finder())
->in($directory)
->files()
->name('/^([a-z0-9_-])+\.stories\.twig$/i');
In a D10.3 project
composer why 'symfony/finder'
... drush/drush 12.5.3 requires symfony/finder (^6) ...
The code above works for me for symlinks as well. See my previous comment.
I think the code could be simplified even more. (I haven't tried it)
$template_files = new Finder();
foreach (['profiles', 'modules', 'themes'] as $directory) {
$template_files->append(
(new Finder())
->in($directory)
->files()
->name('/^([a-z0-9_-])+\.stories\.twig$/i'),
);
}
foreach ($template_files as $template_file) {
$this->generateStoriesForTemplate($template_file->getPathname(), $options);
}
+1 for follow symlinks. For different reasons.
Composer has a feature, called repository type "path".
https://getcomposer.org/doc/05-repositories.md#path
It is a very handy feature for local development, and it also uses symlinks. (That is the best part).
So, the whole Drupal module is symlinked into DRUPAL_ROOT/modules/contrib/*
Currently the code throws an "UnprocessableEntityHttpException" exception with message: "Invalid template path for the stories "%s"."
Even if the module does not contain any SDC component or *.stories.twig file.
For example "admin_toolbar" module, just because it is the first in alphabetical order.
sweetchuck → created an issue.
sweetchuck → created an issue.
sweetchuck → created an issue.
sweetchuck → created an issue.
sweetchuck → created an issue.
@cedricl Maybe I am mistaken, but I think you can have whatever file name you want.
$settings['graphql_export'] = [
'graphql_compose_server' => [
'graphqls' => "../$site_path/graphql/schema.graphql",
'json' => "../$site_path/graphql/schema.json",
],
];
However, the default value and the example in the README.md should be something that is instantly usable.
What if I would like to add a new column?
Then I should be able to add field into the ::buildHeader()
as well. Not just in the ::buildRow()
What if I would like to add something above or below the table?
What if I would like to add new rows to the table? For example with colspan=42
which contains a long description which belong to the previous or next row.
Then it would be useful to have a dispatched event in the ::render()
, to be able to alter the whole $build
render array.
This issue can be a quick fix for the problem.
Most of the time EntityListBuilder is used for config entities (in the original topic there is a use case for NodeListBuilder).
What is the user story here?
As a side builder I would like to be able make changes on pre-defined lists, such as "Node types", "Image Styles", "Block types", "User roles" and so on.
- modify existing fields
- remove existing fields
- add new fields
- alter filtering options
- alter sorting options
- change the layout of the listed items (table vs anything else)
For me this sound like a task for "views".
Unfortunately, event the
config_views →
can't handle this task properly, because there is not enough support and metadata on config schema.
This is also related: #2318187: FieldDefinitionInterfacegetDefaultValue() requires an entity →
I think the whole EntityListBuilder concept should be replaced with a views based solution.
The reason it does not work with node:uid
is that,
perepopulate field values from query string only works when the field has no default value.
"Entity owner" field usually has a default value (current user), because of the BaseFieldDefinition::setDefaultValueCallback().
Non empty fields can't be overridden from query strings.
See Populate::populateForm().
When I temporally remove that condition and I use this query string ?edit[uid][widget][0][target_id]=42
then it looks good in the node create form. I did not press the "Save" button.
I hope this information helps you to find a custom solution/workaround.
In my use case, I would like to make it easier for administrators to create a node for somebody else. They already have access to the "Authored by" field, just make sure they don't forget to change it.
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());
}
}
I can confirm.
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.
@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)
Sweetchuck → created an issue.
@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?
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.
Sweetchuck → created an issue.
Sweetchuck → created an issue.
Sweetchuck → created an issue.
Wow. That was quick. :-)
With EPT Core 1.4.2 it looks good. (Olivero and Claro)
Sweetchuck → created an issue.
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 →
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?
@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.
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.
Patch #5 took care of three occurrences
- ActiveLinkResponseFilter
- RssResponseRelativeUrlFilter
- ResourceResponseValidator
Patch #29 for an unknown reason do nothing with ResourceResponseValidator.
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'],
];
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...
With that implementation how can you re-use the same datalist for multiple textfields?
@AnyBody I think that contrib module implements the required functionality in a wring way.
datalist != textfield
I am not sure about the comments and the deprecation message.
Sweetchuck → created an issue.
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">
Give them a closer look.
For example this one: \Drupal\Core\Database\Query\Delete::execute
Sweetchuck → created an issue.
Sweetchuck → created an issue.
Sweetchuck → created an issue.
Sweetchuck → made their first commit to this issue’s fork.
@krunalunadkat Have you checked the already existing MeregRequest before you uploaded the that *.patch file?
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
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"?
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:
- Single page Webform (non multi-step)
- with settings: "Track wizard progress in the URL by" = "Page index (?page=2)"
- 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?
Sweetchuck → created an issue.
Patch #2 works for me. RTBC++
Same patch as it was in comment #1, but this one applies for 7.x-3.3
Sweetchuck → created an issue.