plugins – Applying module CSS to page

I built a module with custom CSS. I’m not sure why the CSS isn’t being applied, although it seems like the page is loading the CSS file (when I view source in a page, I can see my custom CSS file, and when I open that link, the content is what it should be). The div class name is pretty custom, so I don’t think it’s being overwritten.

Code in module:

wp_register_style('hbc_comicCanvas', wp_normalize_path(plugins_url('css/hbc_comicCanvas.css',__FILE__)));
wp_enqueue_style('hbc_comicCanvas',wp_normalize_path(plugins_url('css/hbc_comicCanvas.css',__FILE__)),array(),'1.0.0',true);

I also add default content to the page:

 add_filter( 'default_content', "<div id="hbc_drawingPanel">drawingPanel id</div>
<div class="hbc_drawingPanel">drawingPanel class</div>");

And the content of the CSS file:

div #hbc_drawingPanel{
  background-color: purple;
}
div .hbc_drawingPanel{
  background-color: purple;
}

Thanks for any help. I’ve looked at a bunch of suggestions, but nothing has panned out so far.

plotting – Get a List plot with hep of module

I just want to get a list plot for my model which I wrote with help of the module.

pp(nn_) := Module({},
  n = nn;
(*......Main code Here ....*)
ff(Solve::"svars");
 N(U /. qsol);
 ListPlot(N(U /. qsol), n, AxesLabel -> {"n", "E (J)"}))
Off(Solve::"svars");
Show(Table(pp(j), {j, 1, 5}))

It gave me the correct answer, but I couldn’t get any action.

Its the answer :

Show({ListPlot(0., 1, AxesLabel -> {"n", "E (J)"}), 
  ListPlot(3087.46, 2, AxesLabel -> {"n", "E (J)"}), 
  ListPlot(7312.15, 3, AxesLabel -> {"n", "E (J)"}), 
  ListPlot(8717.81, 4, AxesLabel -> {"n", "E (J)"}), 
  ListPlot(9210.08, 5, AxesLabel -> {"n", "E (J)"})})

I want to get a plot that evaluates all my code for n and plots it for every n.

In Roll for Shoes Prison Module, how much hp should each character have?

The “Prison Module” module by Mongoose systems (given out free in 2020) offers a variant rule for Roll For Shoes involving wounds and scars: you take a wound when you are attacked, hit by a trap, or fail a dangerous action, and if you take a second wound in the same place, it becomes a scar that cannot be healed anymore. It says that if you take as many scars as you have HP, you die. However, I cannot find in the module anywhere how much HP you have. Should I just have them roll a d6? Do I set an HP level based on their class? Or what was the intent here?

8 – How to create a link to start a visit with the “Tour” module?

I created a module to make a visit to my site.

I want an ananyme or authenticated user to be able to start the visit by simply clicking on a link.

How to create a link to start a visit with the “Tour” module ?

Here is my file :

langcode: fr
status: true
id: front
label: 'Visite générale'
module: user_tour
routes:
  - route_name: view.front.page_front
tips:
  le-menu-de-navigation:
    id: le-menu-de-navigation
    plugin: text
    label: 'Le menu de navigation'
    weight: 1
    body: "Le menu de navigation, permet de naviguer sur le site.rn<div class="icon-tour position-relative">rn  <i class="fas fa-exclamation-circle fa-lg position-absolute"></i>rn  <i class="fas fa-th-list"></i>rn</div>rnUn badge rouge apparaît sur l’icône, lorsque vous pouvez administrer la page actuelle."
    location: right
  les-notifications:
    id: les-notifications
    plugin: text
    label: 'Les notifications'
    weight: 2
    attributes:
      data-class: navbar-toggler-left
    body: "Le logo notification, permet d'accéder aux notifications liées à l'activité de votre compte (statut des commandes, message privé, ...), ainsi qu'à celle du site (suivi des groupes, suivi des boutiques, ...).</p>rn<div class="icon-tour position-relative">rn  <i class="fas fa-exclamation-circle fa-lg position-absolute"></i>rn  <i class="fas fa-comment-dots"></i>rn</div>rnUn badge rouge apparaît sur l’icône, lorsque vous avez un nouveau message."
    location: right
  le-logo:
    id: le-logo
    plugin: text
    label: 'Le logo'
    weight: 3
    attributes:
      data-class: logo
    body: "Cliquer sur le logo S1BIOSE pour revenir à la page d'accueil. Vous y trouverez toutes l'activité du site classé par ordres chronologiques.rn<div class="icon-tour position-relative">rn  <i class="fas fa-exclamation-circle fa-lg position-absolute"></i>rn  <i class="fas fa-check-circle fa-lg position-absolute"></i>rn  <div class="logo navbar-btn pull-left rounded-circle overflow-hidden timeline-notification m-0">rn    <img src="/themes/custom/bootstrap_subtheme_front_office_old/images/icon-96.png" alt="Accueil">rn  </div>rn</div>rnUn badge <i class="fas fa-exclamation-circle"></i> apparaît sur le logo, lorsque de nouvelles notifications arrivent dans votre fil d'actualité privé. Un badge <i class="fas fa-check-circle"></i> apparaît sur le logo, lorsque vous avez de nouvelles tâches importantes."
    location: bottom
  les-paniers:
    id: les-paniers
    plugin: text
    label: 'Les paniers'
    weight: 4
    attributes:
      data-class: navbar-toggler-right
    body: "Le logo panier, permet d'accéder à vos paniers d'achats.</p>rn<div class="icon-tour position-relative">rn  <i class="fas fa-exclamation-circle fa-lg position-absolute"></i>rn  <i class="fas fa-shopping-basket"></i>rn</div>rnUn badge rouge apparaît sur l’icône, lorsque vous ajoutez des produits ou des services."
    location: left
  le-menu-de-recherche:
    id: le-menu-de-recherche
    plugin: text
    label: 'Le menu de recherche'
    weight: 5
    attributes:
      data-class: navbar-toggler-second
    body: "Le menu de recherche, permet de filtrer et trier le contenu d'une page.</p>rn<div class="icon-tour position-relative">rn  <i class="fas fa-exclamation-circle fa-lg position-absolute"></i>rn  <i class="fas fa-filter"></i>rn</div>rnUn badge rouge apparaît sur l’icône, lorsque vous pouvez filtrer ou trier le contenu de la page actuelle."
    location: left
  le-bouton-plus:
    id: le-bouton-plus
    plugin: text
    label: 'Le bouton plus'
    weight: 6
    attributes:
      data-class: 'block--boutonplus .fa-circle'
    body: 'Ce bouton vous permet de créer votre compte, mais aussi des groupes, du contenu, des boutiques et des produits.'
    location: right
  trouver-de-l-aide:
    id: trouver-de-l-aide
    plugin: text
    label: 'Trouver de l''aide'
    weight: 7
    attributes:
      data-class: panel-help
    body: 'Nous mettons à votre disposition des guides, des tutoriels, une foire aux question, ... où vous trouverez facilement de l''aide.'
    location: top
  les-modes-de-contact:
    id: les-modes-de-contact
    plugin: text
    label: 'Les modes de contact'
    weight: 8
    attributes:
      data-class: panel-contact
    body: 'Vous pouvez nous contacter par téléphone, courrier postal et par e-mail.'
    location: top
  les-informations:
    id: les-informations
    plugin: text
    label: 'Les informations'
    weight: 9
    attributes:
      data-class: panel-information
    body: 'Ici vous trouverez toutes les informations juridiques concernant notre site.'
    location: top
  le-bouton-retour-en-haut:
    id: le-bouton-retour-en-haut
    plugin: text
    label: 'Le bouton retour en haut'
    weight: 10
    attributes:
      data-id: back-to-top
    body: 'Ce bouton vous permet de remonter en haut de la page.'
    location: left

debian – Ansible package module keeps installing packages

We hava a mixture of CentOS, RedHat, Debian and Ubuntu servers all over the place. I am trying to install generic packages that have the same name for all Distros. The package module seems to work only on CentOS / Redhat boxes, but on Debian boxes it keeps on installing the package. After the script completes the packages are not installed. Rerun the script and same thing. I am running Ansible on the latest Mac OS and the version is 2.9.11

What am I missing to get this to work on Debian systems?

I know that as a workaround I can use when: ansible_distribution and determine what version I am running, but that means I have to make the script longer and type the packages twice.

## Installs Generic OS independent packages ##
- name: "Installs base packages"
  package:
    name:  "{{ item }}"
    state: present
  with_items:
    - tcpdump 
    - wget 
    - screen 

Reusable module using spring framework with spring-boot application modules?

I have a maven module which will handle DB interactions for various scenarios. I want this module to use spring framework so we can leverage the standard DI and integration test capabilities. This module will never run as it own application. Lets call this the DB module.

This module will be included as a dependency in a number of deployable application modules which use spring-boot to get easy access to various REST / Web interfaces. Lets call this will be the App module.

As I see it, the DB module will define the standard classes and @Autowire or @Resource JdbcTemplate objects. The integration tests of the DB module will define the full context for the module when running tests. I can use various test profiles at this level to switch between h2 and real DB’s.

In the App module, we’ll have a standard Config class which will declare the @Configuration annotation and then declare the various @Beans from the classes in the DB module.

Are there any guidelines or advise on how i should declare contexts or beans in these modules?

20.04 – Installation of amdgpu drivers locking up at building initial module on 20.4

I am trying to install amdgpupro drivers on latest Ubuntu 20.4 Desktop.

I install Ubuntu on a USB, boot from that USB and try to install.

I use ./amdgpu-pro-install -y --opencl=legacy,rocm --headless

It makes it to 96% and the system locks up at Building initial module for 5.4.0-52-generic

I have tried all the amdgpu drivers from 20.10 to current.

Ive read several different fixes such as using sudo(the command asks for sudo password as well) and such but nothing has worked.

It is being installed on a mining rig with 6 GPUs, 3 rx570 and 3 rx 580 on a Biostar motherboard.

Any more information required let me know.

Thanks

8 – Exported feature with roles not imported when loading module

TLDR; I’d like to export the permissions I’ve added to the authenticated role, and have them appear on a different server when installing the custom module. However, when I install the module on a fresh server, the permissions for the authenticated user remain as default, but I can see in admin/config/development/features that there are pending changes, and once I import them the settings are correctly applied. Why aren’t they applied on loading the module?

First I log into a blank dev site, navigate to admin/people/permissions and add the Article: Create new content permission for the authenticated user (which I know is create article content from looking at the page source in my browser).

I now navigate to admin/config/development/features/edit and select Roles->Authenticate user (authenticated), pick a module name, enable Mark all config as required and click Download Archive.

The result is a module that contains 3 files:

my_module.features.yml

required: true

my_module.info.yml

name: 'my module'
type: module
core: 8.x
dependencies:
  - user

Since I’m using 9.0.7 I changed this to;

name: 'my module'
type: module
core_version_requirement: '^8 || ^9'
dependencies:
  - user

config/install/user.role.authenticated.yml

langcode: en
status: true
dependencies: {  }
id: authenticated
label: 'Authenticated user'
weight: 1
is_admin: false

For some reason Features didn’t pick up my permission changes, so I changed this manually to;

langcode: en
status: true
dependencies: {  }
id: authenticated
label: 'Authenticated user'
weight: 1
is_admin: false
permissions:
  - 'create article content'

Now I tried to install the module by copying it to /modules/custom/my_module and running drush en my_module on a completely clean site. However, when I navigate to admin/people/permissions I see this:

enter image description here

When I go to admin/config/development/features/diff/my_module I can see that my features were correctly interpreted, just not applied:

enter image description here

If I now select Import Changes the permissions apply correctly. But why aren’t they already applied, when the my_module module is clearly enabled?

I tried playing around with the weight value in user.role.authenticated.yml to no avail (I changed it to 9999 and -9999 but it didn’t seem to have any impact).

The fact that I had to modify my user.role.authenticated.yml indicates that something has perhaps gone wrong at the export step, but I don’t know enough about the features module to know if these events are related.

Use of undefined constant FILE_CREATE_DIRECTORY in File(Field) Paths module

In Drupal 9, using the last dev version of FileField Paths, whenever I upload a new file, after saving the form I get the following warnings:

Warning: Use of undefined constant FILE_CREATE_DIRECTORY - assumed 'FILE_CREATE_DIRECTORY' (this will throw an Error in a future version of PHP) in filefield_paths_filefield_paths_process_file() (line 115 of modules/filefield_paths/filefield_paths.inc).

Warning: A non-numeric value encountered in DrupalCoreFileFileSystem->prepareDirectory() (line 524 of core/lib/Drupal/Core/File/FileSystem.php).
DrupalCoreFileFileSystem->prepareDirectory('public://images/parallax', 'FILE_CREATE_DIRECTORY') (Line: 115)
filefield_paths_filefield_paths_process_file(Object, Object, Array) (Line: 363)

And the file is not uploaded to the path selected.

I have created an issue here: https://www.drupal.org/project/filefield_paths/issues/3170806 but nobody has replied, and I’m quite desperate because I can’t deliver a project until this is solved.

Any ideas?