🇺🇸United States @mortona2k

Seattle
Account created on 16 November 2010, over 13 years ago
#

Merge Requests

More

Recent comments

🇺🇸United States mortona2k Seattle

There were a handful of issues I was running into, mostly not understanding how it all works.

I can't remember how I fixed this, maybe defining the ajax library dependency another way.

I'm using Unocss and need to figure out the right order of css so that utilities and component styles play nice together. Making improvements, but still no clear answer.

I'm ok closing this ticket and spelling out narrower issues if I encounter them again.

🇺🇸United States mortona2k Seattle

mortona2k created an issue.

🇺🇸United States mortona2k Seattle

@scotteuser - Hey I tried to update the 10.2 branch for 10.3 yesterday, but I couldn't figure out a good way to do it. First I tried to rebase, but gave up after a bunch of conflict resolutions. Then I tried merging, most of the important changes were merged no problem, and I tried to check for other relevant changes but it's a big list and hard to verify. When I completed the merge, it was about 80% right with some extra stuff.

Do you have any notes on how to do these kinds of branch updates in a sane way?

🇺🇸United States mortona2k Seattle

Figured it out. Just got this working, so needs some testing.

🇺🇸United States mortona2k Seattle

Elevating the priority because this is going to be a problem for people who want to update when 10.3 comes out. Critical may be appropriate for this.

I tried updating the code to change the paths for the new component library names, but it didn't work to change the final library definition.

Drupal\Core\Asset\LibraryDiscoveryParser->librariesForComponents() is where it builds components.all.

I'm looking into available hooks for overriding that - any other ideas?

🇺🇸United States mortona2k Seattle

I'll take a look next time I have to do imports. Right now I'm keeping zip files in git, and having individual files would be better to show the updates in the diffs.

With this workflow, a dev could download the files from the UI and put them in the directory (is there a way to download them straight to there?).

Otherwise, I think the export needs an option to do individual files for bulk updating.

🇺🇸United States mortona2k Seattle

Thanks I was able to install on 10.3 without composer errors.

🇺🇸United States mortona2k Seattle

I made some quick changes that work just for zip files. Any guidance on where this logic should go?

🇺🇸United States mortona2k Seattle

mortona2k made their first commit to this issue’s fork.

🇺🇸United States mortona2k Seattle

This seems to be working, and the code changes look good.

I linked the config form ticket to work on next, now that this method is in place.

Until then, I am using a script to keep track of the list and reuse default parameters:

#!/bin/bash

lando drush content:export node ../single_content_sync/content \
--entities=\
182a72f3-a11e-4740-b88a-723d9f5d7984,\
b551610d-8425-47fe-86de-5e4d144d5c27
🇺🇸United States mortona2k Seattle

Got it working.

In SsoController:loginUserByEmail, $this->userSync->synchronizeUser() would fire, but then the next line was returning an empty array, not the new user.

It looks like it should get saved in $this->userSync->updateUserData(), but the $user instanceof UserInterface check fails because it gets an empty array.

Saving the user in $this->userSync->synchronizeUser() gets it working, but there should be some other adjustment to the logic. I don't know if a new user entity could be presaved somehow so it gets returned in the lookup. If not, maybe saving it here is fine.

Thanks for your work on this.

🇺🇸United States mortona2k Seattle

Fixed the typo.

🇺🇸United States mortona2k Seattle

mortona2k made their first commit to this issue’s fork.

🇺🇸United States mortona2k Seattle

The patch in the module conflicts with drupal 10.3.

🇺🇸United States mortona2k Seattle

It's still not working for me, same error.

Can you add some debug logs or point me towards what to check?

🇺🇸United States mortona2k Seattle

It's working with the standard install profile, but not with my custom one.

I found out it's because I don't have my user 1 given the administrator role. I think we should use another access check.

🇺🇸United States mortona2k Seattle

I encountered this issue, looks like I have an aggregated table with a sum on a column that has no values.

This patch fixes the warnings. It's just checking isset($result_row->_relationship_entities[$relationship]) before using the value.

🇺🇸United States mortona2k Seattle

Selecting multiple date fields in the calendar display settings is for adding content with different date fields.

Just add your date field once, and it won't duplicate. Or just use the start date if you have two different fields for start/end.

🇺🇸United States mortona2k Seattle

I guess the remaining problem is that when you require as drupal/user_activity_log, it gets the 3.8 version by default. So most people will encounter this issue.

Since the system prevents deleting the 3.8 tag, I think the best way to resolve this is to do a 4.0 release with the current 1.10 code.

🇺🇸United States mortona2k Seattle

I'm looking into customizing generated dummy content using devel_generate. That uses the fields generateSampleValue() function.

The two places I'm aware of this function being used are for in the Layout Builder UI and Devel Generate.

In LB, I want to see dummy values that resemble my content.

In Devel Generate, I want dummy values in line with the data I'm using.

To override this function on a field... I have to create my own class and override the field?

What I'm looking for is an easier way to override generateSampleValue().

🇺🇸United States mortona2k Seattle

This change just sets the title's region to hidden. This makes it so that the title field is not automatically added to the display.

🇺🇸United States mortona2k Seattle

I tested with the patch, but looks like the original problem still exists.

With a new d10 install and this module with the patch, I create a new page and fill in the title and display title. When I save, the page shows the display title both on the page and in the admin content listing. When I edit the page again, both the title and display title are filled with the display title value.

🇺🇸United States mortona2k Seattle

I had the sync SP checkbox set on both sites.

Still getting the same results in beta 2. I can log in with a synced account, but not if it's unsynced.

I am also seeing this message intermittently:

To log in to this site, your browser must accept cookies from the domain projects.mantra.lndo.site.

I added both sites as exceptions for my browser cookies in firefox, but still see the warning.

🇺🇸United States mortona2k Seattle

I can't say why it exists, but it appears to be only a change to the readme file: https://git.drupalcode.org/project/user_activity_log/-/commits/8.x-3.8/?...

It's behind the current release and should just be ignored. Bit it does get accidentally downloaded if you don't type the version constraint.

🇺🇸United States mortona2k Seattle

SDC Block lets you place components directly into layouts as blocks, with an edit form corresponding to it's props/slots.

I was thinking that an easy way to component documentation is to create a book and add component samples to pages by embedding in the layout.

🇺🇸United States mortona2k Seattle

I just got it working. It looks like the user sync isn't working.

I got these errors on my SP site when the users only on the IDP site:

11632 26/May 16:44 sso_connector Critical Failed to synchronize or log in the user with email goodbye@example.com, redirecting to error.
11631 26/May 16:44 sso_connector Error User not found or failed to load during SSO with email goodbye@example.com.
11630 26/May 16:44 sso_connector Info Redirecting to IdP for authentication.

With the user existing in both places, it redirects to the IDP login, and on save, redirects back to the SP site where I'm logged in.

🇺🇸United States mortona2k Seattle

mortona2k created an issue.

🇺🇸United States mortona2k Seattle

Cool, I can see my components but wasn't able to click on them at first. I copied the card example and now I see links for the demo content.

This is great. I'd love to see a Drupal native styleguide like pattern lab or storybook. There could be more integrated features, like showing where a component is used, or rendering live examples.

My last comment is describing something that is supposed to be part of starshot. Do you know where that work is happening? I imagine a component browser is going to be part of that.

🇺🇸United States mortona2k Seattle

mortona2k created an issue.

🇺🇸United States mortona2k Seattle

The MR looks like the right approach to me.

🇺🇸United States mortona2k Seattle

I started looking into the failing test. Still not sure why it's failing exactly, but will need to check the logic for how it's processing tokens. I think it was choking on an array value in the test.

🇺🇸United States mortona2k Seattle

Annotated example was using the contrib module path for the component schema. I changed it to use the one in core SDC components.

🇺🇸United States mortona2k Seattle

The patch works for RC10, but needs to be rerolled for dev.

🇺🇸United States mortona2k Seattle

I like this idea, it would help clean up the model making it easier to set up and understand.

I would like it to be smart, where you can select a content type and it provides the available fields to fill in.

🇺🇸United States mortona2k Seattle

mortona2k created an issue.

🇺🇸United States mortona2k Seattle

Autocomplete wasn't working for me until I saved the view and tried it on the page.

🇺🇸United States mortona2k Seattle

I'm using this with content_model_documentation and group, and this fixes the error on admin pages for me.

It's a small change, explained well by the developer's comments above.

🇺🇸United States mortona2k Seattle

mortona2k changed the visibility of the branch 1.0.x to hidden.

🇺🇸United States mortona2k Seattle

mortona2k changed the visibility of the branch 1.0.x to active.

🇺🇸United States mortona2k Seattle

I configured private and temp dirs and that fixed it.

🇺🇸United States mortona2k Seattle

When you import SCS config on the target site, the IDs don't exist and the form breaks.

This should probably use UUID for the config storage, and not use autocomplete for the form.

The current form can get difficult to use when there is a lot of content. I think switching to a multivalue field instead of autocomplete tags would help. We could show the UUID from config, or the title if it exists. There could be an autocomplete field to help populate the value.

🇺🇸United States mortona2k Seattle

You're right, I must have had my wires crossed in testing.

The change looks good to me, ripping out a bunch of stuff that duplicates what ImageWidget does.

Looks like you handled the validators from #3413668.

I think it's RBTC, just looking for confirmation.

🇺🇸United States mortona2k Seattle

For lando, this snippet proxies port 3000 in the container to node.mysite.lndo.site (I have vite running on 3000 internally, but the port doesn't matter):

proxy:
node:
- node.mysite.lndo.site:3000

When I have an index.html file for vite, that's what appears at the node url. If I use an asset url, I get the code.

I never figured out how to proxy an internal port to an internal url with ddev.

🇺🇸United States mortona2k Seattle

This issue also exists in the SVG Image module: https://www.drupal.org/project/svg_image/issues/3413668 📌 Replace upload validators with new ones introduced in Drupal 10.2 Needs work

🇺🇸United States mortona2k Seattle

I applied the latest commit, but I still see the duplicate allowed types. Would the ticket in #8 need to be rebuilt on this one to fix that?

Anything I can help with?

🇺🇸United States mortona2k Seattle

mortona2k made their first commit to this issue’s fork.

🇺🇸United States mortona2k Seattle

mortona2k changed the visibility of the branch 3429299-automated-drupal-11 to hidden.

🇺🇸United States mortona2k Seattle

The patch fixes the specific error and lets the report load. I created a new issue for a better invalid html report.

🇺🇸United States mortona2k Seattle

mortona2k created an issue.

🇺🇸United States mortona2k Seattle

mortona2k changed the visibility of the branch 1.0.x to hidden.

🇺🇸United States mortona2k Seattle

What do we want to do with bad html like this? Seems like it should have another report for it.

In the code that renders the table, we can check the tags/attributes for invalid options and show a message. But I found it more useful to change the route regex to allow the invalid html so we can see it in the report.

There is a note in the routing file that the attribute regex is not broad enough, but this issue is for the tag regex. I just added a : to both.

We can probably use the existing regex to check for valid html and then put the invalid tags in a separate group. We probably don't want to have them in the list at the bottom for copying into text filters, or at least call it out somehow for the dev to consider.

🇺🇸United States mortona2k Seattle

Here's a module I put together with a splide component and some demo components made with it.

https://github.com/mortona42/splide_sdc

The slide component is self contained, with the splide library minified files in a directory. This could be a library dependency instead though.

There is a block you can place anywhere that will render 2 demos. So far they are just a minimal implementation and a basic slider with thumbnails.

If someone wanted to create a custom slider, they could copy the demo component into their own theme/module and modify it.

The most complicated feature was a video slider with thumbnails. On mobile, the thumbnails were horizontal below and on desktop they were vertical and to the right. I was able to configure the splide module display with breakpoints to switch the layout, and the module's provided layout options helped too. That, and the blazy video loading got me to about 80%.

The challenge from there was sifting through the layers to understand how to polish the rest. When I started with a fresh component, I was looking at the api documentation and could see any helpful implementation notes while I adjusted the JS. Going through the UI got me confused what was from the library vs added by the module, and I couldn't directly translate the docs into what I needed to do.

The CSS was pretty tricky for me, so I did a codepen and then wanted to apply that to the module, but that's when I went down the SDC route since it fit so well.

If you're interested in taking this further, it would be good to find a way to include all the little fixes in a way that's convenient to apply in drupal. Maybe the demo components could implement them with comments linking back to the docs for more info about why that line of css or js is there.

I'd like to have rebuild the difficult component I described, but I'm out of time for now. It's mostly css for a responsive grid and some adjustments to the js. I also did not have the thumbnails synced to the slider so you could scroll through them while a video is playing and not change the video until you click a thumbnail. That was something I don't think you can do with the module.

🇺🇸United States mortona2k Seattle

Last time I tried the two, this one had better support for layout builder.

🇺🇸United States mortona2k Seattle

I rebased the branch onto 1.4.x.

I'm just starting a new project phase and plan to use this feature to deploy our updated Page content with new layouts. Will need to Export pages as they are completed and include them in the defaults to make it easy to catch quick changes we have to make later. I also will try it out for some menu changes, and probably some other things like blocks, media, paragraphs. I think most of it should be working pretty good now, but will patch as I encounter any issues.

🇺🇸United States mortona2k Seattle

mortona2k changed the visibility of the branch 3363087-configure-export-settings to hidden.

🇺🇸United States mortona2k Seattle

I ended up using drupal's ajax dialog and loading a view page configured as a slider.

I spent a lot of time on my last project building sliders according to designs we were given. I started with the Splide modules, hoping they would be a shortcut, but as you've seen my tickets I had some challenges in getting things just right.

Here are my thoughts on the experience, and an observation on module development. I appreciate all your contributions, so this isn't criticism, it's just my reflection on what worked for me.

I think the challenge is in creating integrations for systems. Here we want to work within the Drupal UI to configure Splide displays. The hard part is creating an interface that provides all the library's options in a clear way. It takes a lot of time and effort to build something with a lot of flexibility that's easy to use. I felt like I had to learn a lot about how the module was set up, and how to override things, instead of having a quick way to implement the things the library is capable of.

In the end, I used a custom views plugin and SDC components to build with the Splide library. It was easier for me to go from the Splide docs to the code vs trying to figure out the right configuration for the view/splide config. With a base SDC slider component, it was easy to customize the different displays I needed to build in code.

I did keep Blazy because I don't know how to do what it does to load the player/thumbnail/play button. And it was helpful that it's integrated with the splide module to stop the player on transition. I had to re implement that part myself since I didn't use the splide module. This is the kind of integration I do find very helpful though, since it saves a lot of time. There were also some styles that were helpful in some cases, but confusing when I also had my own.

In hindsight, the starting point for development I'd like to have is a collection of SDC components that are integrated with the library. I would copy the component closest to what I need and customize it from there. A separate slider module could provide generic field formatters, views plugins, and others like blocks and layouts that provide the content for the main slider and thumbnails that any slider SDC could plug into. We do have the splide examples module, but it's a bit of a leap to go from that config to what you need for your own. I'm thinking that if the modules were more component based, the provided examples would be the actual starting point for your development.

Thanks for all your work in this area. Your modules are still the most popular, so my views aren't necessarily right for everyone. SDC is still very new, but I am loving it so far. It's great for developers, and modules like SDC Display and SDC Block are making it much easier to integrate via the UI. I don't want to get rid of the Splide UI, rather see it developed further so we have both options and it's fast to configure or customize.

🇺🇸United States mortona2k Seattle

I'm a little fuzzy on this from when I last looked at it, it's possible I overlooked how it's supposed to work. I'll have to look into this closer next time I encounter the issue.

🇺🇸United States mortona2k Seattle

It would be useful to have the tokens in twig, like in views, so we could modify the output further.

🇺🇸United States mortona2k Seattle

For example, if you want to modify the (machine) name of a given field or update the storage definition in some other way. Data needs to be changed on field storage, field config, field instance and database level.

That's exactly what I'm looking for. I've never used django, but I heard about this capability and I thought it would be great for Drupal.

The bigger vision is a UI to facilitate changes, like you have a change field form, and depending on what you're changing to, it gives options on how to transform the data.

Migrate sandbox might be a solution in the middle. I haven't used it yet, but it looks like developers can create and run migrations in the UI with some tools to help build it and review results.

🇺🇸United States mortona2k Seattle

I found a setting in firefox "Show Original Sources" that fixes it.

It's in the Style Editor tab, next to the filter.

🇺🇸United States mortona2k Seattle

Hey, I've been looking out for a way for Drupal to be able to do the kinds of structure changes and data migration that django does.

https://docs.djangoproject.com/en/5.0/topics/migrations/

Is that the direction this project is going in?

🇺🇸United States mortona2k Seattle

Try installing with the minimal install profile, that should trigger it.

🇺🇸United States mortona2k Seattle

I rebased the branch on the latest dev commit.

@wotnak we already have override module/theme/library options in settings.php. I'm assuming that should take precedence in case you want to override something from contrib.

🇺🇸United States mortona2k Seattle

The ddev docs look correct to me (I'm using lando). What issue do you have?

🇺🇸United States mortona2k Seattle

Drupal 10.2.4
PHP 8.2
Comment On Top 2.0.0

The problem is that the comment comment type comes from the standard install profile, so other people might have it set up differently.

The quick fix would be to copy that config into optional, that way it will be included on install, but not override it if it exists.

The larger issue is that this module is dependent on specific comment and field configuration that you may not want to replicate. A deeper fix would be to allow you to choose which comment to activate and that adds the setting for it. Otherwise it's going to break if things aren't set up exactly the same.

But, I think this module is a great idea and I hope it keeps growing.

🇺🇸United States mortona2k Seattle

Including the component in the display mode template.

{{ include('custom_theme:content-header', {
  back_link: content.back_link ?? '',
  artwork: content.field_artwork.0,
  image: content.field_image,
  details: content.field_artwork_details
}) }}
🇺🇸United States mortona2k Seattle

I recently discovered SDC Block, thanks that's really powerful.

Maybe I'm missing something, but I don't see a way to put a block in a block, which is why I'm thinking having the same options for sections would let us compose more complex components in lb.

🇺🇸United States mortona2k Seattle

The solution worked well, I actually used a static token to set the html tag, so it's flexible if you're setting the variable manually.

Here's another case.

I have a block with an entity reference to different content types. I want to make a card component that shows the title, image, and body summary. With this workflow, I have to set up that display mode for all the content types. By having a more capable entity reference sdc ref, we could do that all in one place.

But, I think the solution for that will be in layout builder relationships and tokens.

Or maybe creating a view that lists the fields, but then we need an SDC Views module ;)

🇺🇸United States mortona2k Seattle

We work together, I was hoping to keep going on it with him. We're under a heavy workload atm, but next time I have to implement a component I'll look into it.

🇺🇸United States mortona2k Seattle

When I installed the module, it complained about being unable to install a field config.

comment.comment.field_stick_comment_on_top_boole

Looks like the Comment comment type is missing.

Production build 0.69.0 2024