What is the most current solution to save drafts in Drupal 8, either manually or automatically?

Is there a solution out there that works to autosave content (Drupal 8)?

I've tried AutoSave and Node Edit Protection module, but they don't work for power outages

I'm looking for something like Gmail or Wordpress, when you enter the content, it gets saved automatically as a draft, so if the power shuts down, you don't lose your work....

I could write the content in MS word and paste it....but formating issues, and no access to fields etc...

I've read there should be a "save as draft" in Drupal 8 core, but it's not there

Link to image is here:

Safari Compatibility Issues

I am setting a new drupal page using a theme I purchased. I recently figured out that it has several issues when displaying on Safari.

When I am adding a new menu for example and set it up so that it displays on a specific area of my theme, although it displays correctly on Chrome, Safari and Opera, on Safari it displays the menu on top of my main content (instead on the right side next to the content as it is supposed to display). There are also similar issues with elements in my frontpage.

List all user fields

I tried to get a list of all user fields (machine names and labels), both the defaults such as username, but also the user fields added in the admin panel. I did find something, but I don't think its the right way.

This will only give the default of the user:

\Drupal::service('entity_field.manager')->getFieldDefinitions('user', 'fields')

The other method I tried was:

How to count the number of class on my page and display it in a menu counter ?

I have a site that I created with Drupal 8.

I have a page with a list of tasks like below :

https://i.stack.imgur.com/I49TU.png

- The tasks of color "Red" have the class task-list-danger

- The tasks of color "Orange" have the class task-list-warning

Upgrading Bartik theme from D8 to D9

I recently upgraded a D8 site to D9 using Composer. However, I have since come across an issue when I use the site's existing Bartik theme. I have since found out that in D9, Bartik no longer extends Classy as its' base theme. 

Q: For existing D8 sites that have a customised v8 Bartik theme that use Classy, how can a v8 Bartik theme be successfully transitioned to v9 (as part of the D8 -> D9 upgrade process) when Classy no longer extends? Doing a clean install of Drupal 9, there is no problems using the core Bartik theme that comes as part of the install. 

- Tom

Modify body markup for display only

I am porting a D7 module that i want to release for D8. 

The module injects a block that you can select into the body. The problem i have is that i achived to manipulate the body field and save it, BUT it is really saved to the DB not only for the display. That is very bad as i only want the injection to be happen at display withoput changing the original body content.

Pages

Subscribe with RSS Subscribe to RSS - Drupal 8.x