I have this issue too (and a ton of content using this display pattern).
The simple span change works for me. +1
The use case for the additional change to modal.css, using the [open] selector, is with the Bootstrap theme. I'm using drupal/bootstrap and the modal doesn't show at all when using modal with the text labels (not icons). It appears that Bootstrap loads with .modal { display: none; }
and expects a different trigger to show it, but dialog.add-to-calendar[open] { display: inline-block; }
overrides it in a way that's compatible with how Add to Calendar works.
I understand if you want to keep theme-specific fixes out of your code. The code could instead go in a Bootstrap subtheme CSS file and still work (or one could override addtocal-links--modal.html.twig to add the missing Bootstrap code), but-- maybe Bootstrap is still common enough that it might be worth it to have it just work out of the box?
Thanks for confirming those steps. To clarify, what's making this somewhat more complex is that the sites I support use an unlimited-value smart_date field, and regularly have rules like "Weekly on Thursday, 1:20 - 2:20pm" and "Weekly on Monday, 2:30 - 3:30am" stored together in the same field (sometimes with exception dates removed and non-repeating added dates too).
Without the "Force chronological" option enabled, this becomes a bit hairy (at best):
From a user perspective, it'd be cleaner to continue using the "Force chronological" option, and have a single "Add all to calendar" button merging any multiple rules and assorted dates, like so,
Update: It doesn't work if the "Force chronological" checkbox is checked. The desired behavior would be if you could select "Force chronological," have one tidy Add to Calendar link that includes any and all recurring rules and individual dates, and have all the recurring rules display chronologically below.
@tirupati_singh, I tested your changes and they seem to work; however, via merge request I proposed an additional change -- I believe the CSS to ensure that the open dialog is displayed belongs in modal.css. I was seeing a separate display bug when modals were selected but not icons -- the modal was never being shown. My change fixes this and should cover both modal scenarios (icons selected or not).
I believe the line of code, .add-to-calendar[open],
can be removed from icons.css as long as it stays in modal.css. Could you test and see if that change works for you?
Apologies for resurrecting a closed issue, but is there a recommended technique for ensuring that anonymous visitors don't see past dates on nodes with the Recurring smart_date formatter displaying upcoming events? I respect that the issue will have to be fixed in core, but I despair of that ever happening. What is the current state of the art for solving this? Any low- or no-code workarounds?
Another, more common (at least for the content creators I support), use case scenario where this regression happens is:
- Create a node to link to, title example: "My page"
- Create a link to "My page" in any ckeditor widget; via the linkit autocomplete selection, it will automatically be replaced to /node/1; BUT, because you are human, forget to check the green check mark to finish making the link. Click anywhere outside the link dialog. No link is created.
- Try to redo making the failed link. Enter "My page" again in the autocomplete widget. After selection, it will not be replaced to /node/1. The autocomplete search query will stay in the link field.
I have use cases that require this as well (i.e. custom breadcrumb on nodes of one type when they have a specific taxonomy term), and think this would be a great niche for Custom Breadcrumbs to fill, since the other breadcrumb modules don't offer it. (Path Breadcrumbs used to, RIP.)
Somewhat off-topic, but say, hypothetically, if I were designing something to show document content-in-page -- that would probably want a custom media type to limit by file type and a contrib formatter, correct? I'm not aware of another document file formatter available in core besides Table/URL/Generic file(?). (FWIW it makes sense to me that the formatter for this might have to be contrib. I've always just provided the default set of media types for my users and hadn't realized until now that there was more interest in a differently-formatted document type.)
I can't find any issues related to Insert/Embed action labeling or functionality related to documents by searching the media system
component, except for
✨
Allow inserting Media not just as an embed (), but as a link
Needs work
and possibly
✨
CKEditor embedded media previews do not render with attached assets
Active
.
I ran this by a few content authors, and the rough consensus was that adding a button for linking in the Media Library, similar to the "After" that you mocked up, would be sufficient to meet the need for the original issue.
A side question emerged, however, with the button labels. Multiple people thought/hoped the renamed button "Embed selected" would do something new/different/better than what "Add selected" currently does -- one guessed that it might display the document content in-the-page, like the contrib PDF project → does. (This group is not satisfied with what they get when they insert/embed document media, though probably that is a whole other issue.) "Embed," as a button label, makes sense for images, but it over-promises on what you get for documents. It seems like the confusion lies between embedding the actual media content (for images) vs. embedding a mysterious box with metadata representing the content (for documents). Is anything possible to address that (either through labeling or functionality)?
Pardon my rough mockups -- no, it shouldn't be implemented as a giant blue button! I included that because it was an established UI pattern (and also easy to mockup).
Are you saying you don't think the button approach belongs with the autocompletion workflow at all? Or that it just needs visual finessing so that it's more clear that it's a secondary action?
Update: I changed the scope and it worked! There was a log message that didn't display on the import screen, that identified the scope as the problem.
Would love to see this ultimately committed. I have a production site that wants to use it.
Update: I changed the scope and it worked! There was a log message that didn't display on the import screen, that identified the scope as the problem.
I'm trying to use this patch, entering all the credentials, but when attempting to import, I get:
The feed from https://example.libcal.com/1.1/events?cal_id=19407 seems to be broken because of error "Client error: `GET https://example.libcal.com/1.1/events?cal_id=19407` resulted in a `403 Forbidden` response: You do not have permission to perform this operation. ".
The same credentials work to get data in Postman (API endpoint URL, grant type, access token URL, client ID & secret). Is this an issue with the patch? Any advice for debugging?
This issue was causing WSOD errors and filling up my site logs, so I attempted... something, based on following examples from other modules. I'm not sure it is proper code or if it actually fixes the issue, unfortunately -- I'm using SmartDate with recurring rules, and either something is broken (but silently, with the patch) or my feed is set up wrong, not sure which (I download the .ics feed, it has items in it; I subscribe with Google Calendar, nothing there)
Could someone else test?
I'm using 8.x-2.3 with Drupal core 10.1.5, and it shows up on the Available updates page as "Facebook Page Plugin." Is this still an issue if you upgrade?
I never tested the original patch, so I'm not sure if it covered all the issues. If someone re-rolls I can test on 10.1.5.
Seconding what brad.bulger said in #37. This issue is not at all fixed in 10.1.5. For clarity, in order to consider this "fixed," these are the use cases that should be supported (am I missing any?):
- Multiple media images can sit together on the same line, centered, and it should be possible to put a cursor in and insert text/spaces between them
- A media image can be inserted and sit between two words in the same line of text
- A media image can be added inside a list item WITHOUT CKEditor putting the text of the list item inside a paragraph tag inside the list item ( 🐛 [DrupalMedia] Formatting lost when attempting to edit media within a list item in CKEditor 5 Fixed fails this; it adds a paragraph tag around the text inside the list item)
- Any inline media image should be able to be linked or un-linked without adding paragraph tags in the markup or having the media image lose its inline positioning
This patch no longer applies to Superfish 8.x-1.7. Could someone please provide a re-roll? And thank you!
Patch #98 works for me too, with a question. As a content editor I would expect to be able to edit an anchor after I've placed it, and I can't figure out how to do it with this patch. Should I be able to do that? (It's also possible that I don't have everything installed properly; I don't know.)
What I'm seeing is a link icon and a large blue "[INVISIBLE ANCHOR: myanchortext]" where the anchor exists, but I can't change "myanchortext" as expected. Clicking, or double-clicking, or selecting the "[INVISIBLE ANCHOR: myanchortext]" text or the link icon doesn't bring up any editing balloon options. Seems like I can only delete the anchor and place a new one with different text.
I'm using anchor_link 3.0.x-dev on Drupal 10.1.2 with CKEditor 5, and patch #98, plus Linkit and the CKEditor Anchor link matcher in the Linkit profile.
Thank you for considering this! The new "Insert Link feature" that I referred to is the new core Link dialog with Linkit-type lookup capabilities (being developed in issue 3317769 ✨ Drastically improve the linking experience in CKEditor 5 Needs work .
I've mocked up a couple of ideas for how it could look, but would ultimately want to defer to established styles and design patterns.
The sites I support do use the drupalMedia toolbar item, and that will likely be our workaround for the CKE5 upgrade (if this new core feature isn't available in time, or if Linkit Media Library doesn't get upgraded for D10). It's acceptable as a workaround, but convoluted as a primary solution (I cringe to think about introducing this workaround to authors who are already reluctant to migrate to D9/10).
Being able to upload a file and insert a link via either the Insert Link or Insert Media toolbar item would be a neat trick. What may(?) distinguish this issue from #3374056 ✨ Allow inserting Media not just as an embed (), but as a link Needs work is in this scenario, the resulting link stays inline -- whereas the example video in #3374056 looks like the media item becomes a separate block-level element. That's fine, but we need a way to keep the links inline too -- part of whatever inline text element it started as.
Linkit now has stable 6.0 and 6.1 releases supporting CKEditor 5, and there is a plan to bring some Linkit functionality to Drupal core ✨ Drastically improve the linking experience in CKEditor 5 Needs work .
I would love to see this module continue to work with Linkit and CKEditor 5. If someone can write the patch, I'll help test.
The ideal would be to switch to just core linking functionality (one day, when it becomes available) and stop using Linkit, but still be able to use this module. The sites I support don't typically use the full range of Linkit features, so it's likely that core will cover it -- the missing feature will be the Media Library button to allow uploads.
While continuing to troubleshoot this, I realized that the events with duplicates did not use a recurring rule, but were instead multiple smart_dates attached to a single event (i.e. the event has a smart_date field that accepts unlimited dates, including the possibility of recurring). I eliminated duplicates by turning on aggregation in the view.
I'm not sure if that solution counts as working "as designed," but using aggregation seems to be a peculiarity of dealing with smart_dates in any views (not just views_ical).
Hopefully the patches can help someone else who has an issue with real recurring smart_dates.
The previous patch did not work for me, sadly. I'm attaching a new patch that makes $processed_rules static, as in Issue 3281261 🐛 Smart Date recurring dates cause duplicates Active .
I need to migrate a D7 site using Content Access to Drupal 10 and would love to see this added to the D10 version. I can't code it, but I would test if someone ported it.
I tested the patch from #28 with CKEditor 4, using a style configured as "drupal-media.img-thumbnail|Imageborder," and it did not add the class to drupal-media.
I arrived at this issue with a very similar use case to #5 -- a small, low-traffic site with a view displaying a carousel of image fields drawn from 3 content types - events (with a date field that needs to be examined at midnight every night to flush past events out of the view), articles, and slides (which are supposed to stay until removed manually by un-promoting or unpublishing them).
I have the custom cache tag to remove events from the view when their date passes. The problem is that with the custom tag alone, new article & slide content isn't being added to the view. New events are added immediately for some reason(?), but new articles/slides aren't added until the cache is cleared. Presumably the view also needs whatever original tags a simple view of content provides.
So, the suggestion in #2 to display the default cache tags in the description would help my use case (because whatever they were, I need to add them back to my view in addition to my time-based custom tag). (Node_list is probably the culprit, but if there is anything more complicated, it would help to have a list of the tags that would have been there before the custom tag was added.)
When I try that patch, I get the following response (using Job Scheduler 7.x-2.0):
patch -p1 --dry-run < job_scheduler_unserialize_null_deprecated.patch
checking file job_scheduler.module
Hunk #1 FAILED at 165.
1 out of 1 hunk FAILED
When updating to views_ical 1.0.0-alpha10, Composer says it cannot apply the patch from #5.
If you can provide an updated patch I can try to test it.
I tried to apply the patch from #9 (querypath-php8-3050692-7.patch), and it did not work. The patch from #3 did apply for us. If you can suggest a different way of patching, I'll try it -- we are keen to upgrade to PHP 8. This was the output:
patch -p1 --dry-run < querypath-php8-3050692-7.patch
checking file QueryPath/CssEventHandler.php
checking file QueryPath/Extension/QPList.php
checking file QueryPath/Extension/QPTPL.php
checking file QueryPath/QueryPath.php
checking file qpa/qpa.classes.inc
checking file qpa/qpa.info
Hunk #1 FAILED at 1.
1 out of 1 hunk FAILED
checking file qpcache/qpcache.info
Hunk #1 FAILED at 1.
1 out of 1 hunk FAILED
checking file qpcache/qpcache.module
Hunk #5 FAILED at 309.
1 out of 5 hunks FAILED
checking file querypath.admin.inc
checking file querypath.info
Hunk #1 FAILED at 3.
1 out of 1 hunk FAILED
checking file querypath.install
checking file querypath.module
Reversed (or previously applied) patch detected! Assume -R? [n] n
Apply anyway? [n] n
Skipping patch.
1 out of 1 hunk ignored
checking file querypath_examples.info
Hunk #1 FAILED at 1.
1 out of 1 hunk FAILED
I can confirm that even with Miscellaneous Symbols enabled, a colon is still being flagged as spam, using the default reject patterns which include a series of spaces with a colon.
When I use Latin as the only language script (WITHOUT Miscellaneous Symbols), and remove " :" from the reject patterns or put quotation marks around it, colons are not flagged as spam. To me this suggests that colons are part of Latin language script, unrelated to Miscellaneous Symbols, and the default reject pattern is the issue.
If " :" is intended to be a pre-installed reject pattern, could it be enclosed in quotes to avoid over-blocking?
Is Special Characters language script available in 2.0.2? (That is the version I'm using, and I can't see an option for Special Characters. Do I need to be testing this with 2.0.x-dev?)
On 2.0.2 I have the following language scripts enabled, and it doesn't allow a colon as in "5:30pm":
- Currency Symbols
- Latin
- Miscellaneous Symbols