Account created on 11 June 2008, over 16 years ago
#

Recent comments

🇬🇧United Kingdom dave_______1

In case anyone hits this from Google

I created a sub-theme from the theme I was using and edited the file templates/content/node.html.twig

I added a check for logged in and if the user was not logged in I added a line to tell them to login.

If they are logged in I used the url from the page and hardcoded the domain in an iframe with the following:

<iframe
  style="height: calc( 100vh - 230px )"
  width="100%"
  height="100%"
  loading="eager"
  allowfullscreen
  src="http://localhost:3000{{ url }}"
  title="Test page view"
></iframe>

This gives the bonus of the edit and delete tabs, but means the revisions fail and the page will not show until it is published.

If anyone has a better solution please let me know.

🇬🇧United Kingdom dave_______1

Thanks for looking into this. That signature mixed is a bit woolly and doesn't make a whole lot of difference, but I'd expect a change to the actual return value in the future. Might just be to pass linting rules...

To get around this I added a change in workflow, the editor now creates content, and when happy, uses the share button on the Front End to post to different social networks.
However, this workflow does not work for the scheduled content, which needs an automated approach like yours, so I'll need to add a ticket to try again.

FYI I try not to use composer for the modules, I download and install manually. I've had problems with module dependencies and changes in the past, so when I get a selection that works together I add them to the repo. I can then duplicate the site with modules for different clients. If I need to update, I can do it locally and test everything before I go to prod. Symfony, Laravel or other PHP project I use Composer

🇬🇧United Kingdom dave_______1

This has been changed so the patch is not needed

🇬🇧United Kingdom dave_______1

From this thread I've created a module that adds in the aside tag.
Just wanted to say thanks @Wim Leers and @Inaetaru and hope it helps someone else finding this searching as I did.

🇬🇧United Kingdom dave_______1

The above seems to work for webp and Drupal 10.1 without the patch linked but after an update to 10.2 it obviously reverted so had to be re-added.
Would be great to have webp, svg and avif in core fields and CKEditor.

🇬🇧United Kingdom dave_______1

Having a similar issue.
Only way I can submit a from is:
1. Create new user
2. Give the role of the user access to

Administer webforms
Warning: Give to trusted roles only; this permission has security implications. Allows administration of global YAML configuration and options.

3. Add a header to the request of
'Authorization': 'Basic ' + btoa("user:password"),

NB. If I give access to Administer webforms to Anonymous user I do not need to add the "Authorization" header

Obviously this is not something I can/will do but as of now I cannot use my contact form (headless website).

🇬🇧United Kingdom dave_______1

I want to drop this here because it is something I've had trouble with since CORS was added to Drupal.
1. Your services.yml DOES NOT go in the sites directory, it goes in the site you are using (usually default) and you can have a different one per site.
2. allowedHeaders, allowedMethods and allowedOrigins are all arrays of strings so to allow all use ['*'] (not [*] or *).
3. Most important, a / on the end of the domain is a different domain so add them both to the array to make sure.

Number 3 has caused me years of trouble, hope it helps someone.

Production build 0.71.5 2024