Got it working with a static ID, this code ins the paragraph--type.html.twig file:
{% set htmx = create_htmx() %}
{% set path = 'htmx/paragraph/451/default' %}
<div {{ htmx.get(drupal_url(path)).trigger('revealed') }}></div>
I dig some additional banging around and I have some progress to report:
I learned that I could test for the existence of HTMX on the page by entering `htmx` into the Chrome console. If the library is loaded on the page you get the object as a response, otherwise you get an error.
I had been under the impression that `{{ attach_library('htmx/drupal') }}` wasn't working, but I just don't think I was clicking the cache clear button hard enough. ;-)
I discovered I could enter XHTML right into the Twig file, this one was fun:
<div>
<div id="response-div"></div>
<button hx-get="htmx/node/105/card" hx-target="#response-div" hx-swap="beforeend">
Register!
</button>
</div>
Once I got confident the HTMX library was loading I experimented with lazy loading the card i the screenshot above:
{% set htmx = create_htmx() %}
<div {{ htmx.get(drupal_url('htmx/node/105/card')).trigger('revealed') }}></div>
I chose "revealed" after experimenting with "load", however "load" was firing many times on the page.
I'm going to close this ticket. I hope someone else finds it useful.
capellic β created an issue.
Thanks @fathershawn,
I plan on reporting back when I've given this a try. I have time blocked next week for a little R&D. :-)
Also experiencing this problem.
Thanks @drdam, I appreciate the assistance.
that's what I would recommend. The "derivative cache" are supported by the CDN, so no need to "force drupal" to handle it.
I just tested this and it doesn't appear to be working for me as you describe.
- Created a new node with a new image media entity.
- Uploaded a panoramic image so its easy to recognize when changing the focal point for the 4:3 use case.
- Defined the focal point on the far left of the panoramic image
- Saved the node, viewed the node, looks fine.
- Update the media entity to define a cropping focal point to the far right.
- Refreshed the page/node that the media entity appears on, no change to the cropping of the image, it appears that the stored in Fastly CDN has not been purged to then grab the updates version.
Thanks @drdam,
Did you use sort of CDN or S3-like storage services ? In this case, the disabling of the flush_derivative_images, in settings are the way to fix the issue.
We are hosting on Pantheon which sits behind the Fastly CDN. Sounds like disabling flush_derivative_images is recommended with this setup?
In crop entity perspective, there is way to detect if the newly created crop is created from a "new uploaded image" or because someone change the ImageStyle configuration to adding crop in it (and a derivative image already exist for the source and must be flushed).
I've read this a couple of times and I think that you are missing the word "no" in the above sentence, that "... there is no way to detect...". Can you clarify?
As a note, I think it's necessary to question the need to have 250 different image styles in the project, just for the issue of storage space consumption (green-it / eco-design / cost / greenwashing...).
It's actually half that but point well taken. I dream of the day we can set one Image Style and Fastly's IO product will use field data to determine the optimal responsive image set.
capellic β created an issue.
capellic β created an issue.
capellic β created an issue.
Oh that's great!
I can't apply those steps right now but will open a new ticket if I have issues? Or keep this one open?
capellic β created an issue.
@danrod
I don't have anything additional to add but am also not sure what information would be useful. The spam submissions have been preserved (Webform).
Great to see this functionality returned! Thanks!!
Just got word from a client that they got hundreds of spam messages over the last 24 hours. All from `45.144.227.*`, all from Taiwan.
Following up on tagging a new release. :please:
Thank you @DamienMcKenna for this patch and all that you do! The patch works for me!
While I think the need for this patch is outdated, I just wanted to note that it caused a bug for us documented over here: https://www.drupal.org/project/paragraphs_ee/issues/3428604 π Add-in-between does not work / all elements are added at the end Closed: works as designed
We figured it out. There was a patch to Paragraphs that was causing the problem.
https://www.drupal.org/files/issues/2022-06-07/SplitText-add-more-button... β on this issue https://www.drupal.org/project/paragraphs_features/issues/3282391#commen... π Text Split feature is not working with latest Paragraphs module Needs work
@stBorchert, thanks for looking into it.
Same issue here.
Thanks @YevKo, this helped me:
I found out that .. disabling .. Aggregate CSS files and Aggregate JavaScript files what leads to the site getting up again.
I was looking for a solution to this and found this ticket. Time for an upgrade! Thanks all!!
Thanks!
capellic β created an issue.
capellic β created an issue.
This thread is fairly old and now you can add attributes via *.libraries.yml
https://www.drupal.org/docs/develop/theming-drupal/adding-assets-css-js-... β
Thanks!
There were some older blog posts I've now included in the feed, the count now stands at 3.
We'll have another article coming up in early January, I'll update the ticket then.
capellic β created an issue.
Thanks @bkosborne, this is helpful.
@catch
is cloudfare caching anonymous HTML requests?
We have a cache rule setup to bypass Cloudflare cache.
Hello all,
We did our first Drupal 10 upgrade deploy last week (October 4) and noticed this error appearing. We have Sentry hooked up to this site so its pretty easy to see the frequency, user agent meta data and the stack trace. I see the user agent and stack tracking has been mentioned above, so I'll provide those details below.
We do have Cloudflare out in front of this site.
Number of errors per day
October 4: 13
October 5: 33
October 6: 44
October 7: 28
October 8: 19
October 9: 18
October 10: 27
October 11: 15
October 12: 14
Browser
- Chrome Mobile 117.0.0: 49%
- Google bot 2.1: 13%
- Chrome Mobile 115.0.0: 5%
- IE 10.0: 4%
- Other: 26%
Interesting that Chrome desktop or Safari doesn't appear at the top of this list. This site isn't "mobile-forward" so it does stand out to me that chrome mobile is representing 62% of the browser generating the errors.
Browser.name
- Chrome Mobile: 64%
- Gooblebot: 13%
- Google Chrome: 4%
- Other: 12%
Furthering my observation in "Browser" section above.
Client OS Name
- Android: 84%
- Windows: 8%%
- macOS: 2%
- Other: 2%
Device Family
- K: 64%
- Spider: 19%
- Mac: 4%
- iPhone: 2%
- Other: 9%
K? Huh? I can only assume that's shorthand for Android? Or is this bot traffic?
Stack trace
/core/modules/system/src/Controller/AssetControllerBase.php in Drupal\system\Controller\AssetControllerBase::deliver at line 132
In App
// First validate that the request is valid enough to produce an asset group
// aggregate. The theme must be passed as a query parameter, since assets
// always depend on the current theme.
if (!$request->query->has('theme')) {
throw new BadRequestHttpException('The theme must be passed as a query argument');
Tell us where your source code is
}
if (!$request->query->has('delta') || !is_numeric($request->query->get('delta'))) {
throw new BadRequestHttpException('The numeric delta must be passed as a query argument');
}
if (!$request->query->has('language')) {
Called from: [internal] in call_user_func_array
/core/lib/Drupal/Core/EventSubscriber/EarlyRenderingControllerWrapperSubscriber.php in Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber::Drupal\Core\EventSubscriber\{closure} at line 123
In App
/core/lib/Drupal/Core/Render/Renderer.php in Drupal\Core\Render\Renderer::executeInRenderContext at line 592
In App
/core/lib/Drupal/Core/EventSubscriber/EarlyRenderingControllerWrapperSubscriber.php in Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber::wrapControllerExecutionInRenderContext at line 124
In App
/core/lib/Drupal/Core/EventSubscriber/EarlyRenderingControllerWrapperSubscriber.php in Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber::Drupal\Core\EventSubscriber\{closure} at line 97
In App
Called from: /code/vendor/symfony/http-kernel/HttpKernel.php in Symfony\Component\HttpKernel\HttpKernel::handleRaw
Show 1 more frame
/core/lib/Drupal/Core/StackMiddleware/Session.php in Drupal\Core\StackMiddleware\Session::handle at line 58
In App
/core/lib/Drupal/Core/StackMiddleware/KernelPreHandle.php in Drupal\Core\StackMiddleware\KernelPreHandle::handle at line 48
In App
/core/modules/page_cache/src/StackMiddleware/PageCache.php in Drupal\page_cache\StackMiddleware\PageCache::fetch at line 191
In App
/core/modules/page_cache/src/StackMiddleware/PageCache.php in Drupal\page_cache\StackMiddleware\PageCache::lookup at line 128
In App
/core/modules/page_cache/src/StackMiddleware/PageCache.php in Drupal\page_cache\StackMiddleware\PageCache::handle at line 82
In App
/modules/contrib/advban/src/AdvbanMiddleware.php in Drupal\advban\AdvbanMiddleware::handle at line 57
In App
/core/lib/Drupal/Core/StackMiddleware/ReverseProxyMiddleware.php in Drupal\Core\StackMiddleware\ReverseProxyMiddleware::handle at line 48
In App
/modules/contrib/cloudflare/src/CloudFlareMiddleware.php in Drupal\cloudflare\CloudFlareMiddleware::handle at line 185
In App
/core/lib/Drupal/Core/StackMiddleware/NegotiationMiddleware.php in Drupal\Core\StackMiddleware\NegotiationMiddleware::handle at line 51
In App
/core/lib/Drupal/Core/StackMiddleware/StackedHttpKernel.php in Drupal\Core\StackMiddleware\StackedHttpKernel::handle at line 51
In App
/core/lib/Drupal/Core/DrupalKernel.php in Drupal\Core\DrupalKernel::handle at line 704
In App
/index.php at line 19
capellic β created an issue.
Thanks for the update @stBorchert.
To be clear, I don't care what the background color is - white or black I'm indifferent. But the issue here is that the text is illegible because it is light gray on white.
This is a good point.
However, and not an argument to keep this module, but I would like a way to set the webp conversion within an Image Optimize API pipeline and not within each individual Image Style.
@DewinImagro
No, no luck. And we tried the patch on https://www.drupal.org/project/facets/issues/3282290 π Combined facet active item incorrect Active without any luck either.
This might be helpful.
https://www.drupal.org/project/gin/issues/3345171 β¨ Extend the Gin offcanvas library override Active
Second embed was wrong.
Embedded images weren't working, so uploaded them.
capellic β created an issue.
For anybody else who has this problem, check your View to be sure that you aren't unwittingly excluding the field.
@gordon, love your approach here. We too want to follow your workflow of using both CKEditor 4 and 5 for a time. We'd like to be transitioned over before we upgrade to Drupal 10.
I'm having the same problem.
The way we build our sites, we have a "Common Description" field that we use for various summary view modes (Teaser, Card, etc). We also use the content from this field for og:description and twitter:description and the description meta tag. Naturally I want this to be the field that is used.
That's odd is that the widget configuration appears to support this need:
@gaurav_manerkar any luck working around this?
I'm wondering if this is related to https://www.drupal.org/project/facets/issues/3282290 π Combined facet active item incorrect Active
We need to do the same thing.
In our situation we have two these two fields we need to combine:
Primary Resource Type - Reference to Resource Types taxonomy vocabulary, single-value field
Secondary Resource Types - Reference to Resource Types taxonomy vocabulary, multi-value field
A given node might look like this:
Primary Resource Type
- Type 1
Secondary Resource Types
- Type 2
- Type 3
We want to provide a single facet to the user called "Resource Type"
The node should appear if any of the terms (Type 1, Type 2, Type 3) are selected, regardless of the field.
We've been experimenting with the Combine option on one of the facets, but it doesn't appear to work.
@cianevans have you been able to resolve?
Once I remove that 'field', and added the VBO field, it ran through as expected.
Thanks for reporting this tip... helped me out today when I was in a jam.
capellic β created an issue.
I've tested this patch and it works well. Thanks!
capellic β created an issue.
added missing steps for testing
Took a closer look at the module code and I see that this integration is intended to work:
Image style class to support retina generation with Image Optimize Pipeline.
https://git.drupalcode.org/project/auto_retina/-/blob/8.x-1.x/src/Entity...
auto link formatting correction.
auto link formatting correction.
HTML markup error.
capellic β created an issue.
I'd like to see an interface option for dealing with this use case.
BTW, if anybody is looking for a way to do this via Terminus, this will work:
terminus remote:drush SITE.ENV php:eval "pantheon_clear_edge_paths(['path/to/file/filename.pdf']);"
I too have a View with an Entity Reference in the Relationships area. All was fine until I started using the Views Unpublished module which caused the View to disappear for those users who didn't have the rights to see unpublished nodes that appeared in that View. Applying the patch in #195 works for me. Thank you all for your work on this, sticking with it, and getting us here.