Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WidgetRouter accepts only PHP UUID #4064

Closed
larjohn opened this issue Nov 20, 2023 · 5 comments · Fixed by #4065
Closed

WidgetRouter accepts only PHP UUID #4064

larjohn opened this issue Nov 20, 2023 · 5 comments · Fixed by #4065

Comments

@larjohn
Copy link

larjohn commented Nov 20, 2023

I installed Drupal on a Windows machine and tried to add DKAN as a module manually. Other than the composer.json stuff that I had to add from the Docker template I found out that the metadata field is disabled by default. I tried enabling it, but it thew an exception:

Uncaught PHP Exception TypeError: "Drupal\json_form_widget\WidgetRouter::__construct(): Argument #1 ($uuid) must be of type Drupal\Component\Uuid\Php, Drupal\Component\Uuid\Com given"

It seems that the Com class is used in Windows installations of Drupal. Why not use the broader UuidInterface instead of Php in the WidgetRouter's constructor?

@github-actions github-actions bot added this to Incoming/Triage in DKAN 2 Issue Triage Nov 20, 2023
@dafeder
Copy link
Member

dafeder commented Nov 20, 2023

Sounds reasonable! Are you able to submit a PR?

@larjohn
Copy link
Author

larjohn commented Nov 21, 2023

Sounds reasonable! Are you able to submit a PR?

@janette was faster!

@janette
Copy link
Member

janette commented Nov 22, 2023

@larjohn can you test that branch and let us know if that fixes the error.

DKAN 2 Issue Triage automation moved this from Incoming/Triage to Closed Nov 30, 2023
@dafeder
Copy link
Member

dafeder commented Nov 30, 2023

@larjohn @janette this just seems like it is more correct on its face and has no downsides so merging, but would still be interested in hearing that it did indeed fix the issue on Windows!

@larjohn
Copy link
Author

larjohn commented Nov 30, 2023 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Development

Successfully merging a pull request may close this issue.

3 participants