Last call to make your voice heard! Our 2022 Developer Survey closes in less than a week. Take survey.

Questions tagged [.info]

Use it for questions about the file containing information about modules and themes.

Filter by
Sorted by
Tagged with
-2 votes
1 answer
36 views

How to reload a (custom) modules dependencies

In Drupal9 , if a module has dependencies, as in my_master_module.info.yml dependencies: - dependency1:dependency1 - dependency2:dependency2 you cant disable/uninstall any of these dependencies ...
user avatar
-2 votes
1 answer
34 views

How to enqueue CSS to administrator side via module

I have a custom Drupal module and I would like to enqueue its CSS to the administrator side. I've tried to add it to the .info.yml file. css: theme: admin-styles.css: {} I also implemented ...
user avatar
2 votes
0 answers
88 views

How to use a module-relative path to translations in .info.yml

I'm new to using Drupal and am building a custom module to learn how it all works. I'm building my module in modules/custom/my_module. I have a Dutch locale file in modules/custom/my_module/...
user avatar
5 votes
1 answer
660 views

Is it possible to use libraries-extend from a module (instead of theme)?

Problem/Motivation I'm interested in altering/overriding the little bit of HTML markup that's output by core, in my case Drupal.theme.mediaEmbedEditButton (from core/modules/media/js/...
user avatar
1 vote
1 answer
36 views

Is the tags section valid in the info.yml file?

I see in the devel.info.yml file a section named tags tags: - developer But I can't find it on the documentation page. Is the tags section valid in the info.yml file or is it just an error?
user avatar
0 votes
1 answer
48 views

Field contains list and values of it are shown in one symbol

I'm developing a drupal module and there's a problem. I need to make a content type with some fields and one of them should have list with string values. But when I try to create content and choose ...
user avatar
3 votes
2 answers
3k views

How do you disable the CSS from a core module in Drupal 8 using libraries-override?

I'm trying to disable the CSS styles from the layout discovery module in my theme.info.yml file. I've tried several options, but I can't seem to get it to work. This is what I have now. libraries-...
user avatar
0 votes
1 answer
32 views

Custom Module Remote Fails Checksum with Drush

Background I have several proprietary Drupal modules that my company uses. We want to update these across all our sites. To that end, I've built an endpoint that produces code according to the (ill-...
user avatar
0 votes
1 answer
472 views

My Custom drupal 8 module does not shown in modules list

I'm developing my first drupal 8 module, a custom migration module, the info.yml file is written as follow : name : Drupal Center Custom Migrate description : This module provides custom migration ...
user avatar
3 votes
1 answer
111 views

Can I define the minimum php version for my module in my .info.yml file?

I need to define the minimum PHP version in my module.info.yml file but I don't know if this is posible using: php: 5.6 If you search about this in the drupal.org documentation you will only see the ...
user avatar
5 votes
2 answers
368 views

How to restrict a module to a specific core version?

Drupal 8.3 introduced some changes, which broke a custom module; fixing the changes causes the module to break in previous Drupal versions. One way to handle this would be to require Drupal core to ...
user avatar
  • 434
0 votes
1 answer
92 views

Why is the CSS for my theme not loading while the JS is?

Theme mytheme is placed under /sites/all/themes/ Content of mytheme.info.yml : name: My Theme type: theme description: Custom theme. core: 8.x base theme: classy version: 8.x-1.0 libraries: - ...
user avatar
  • 1,005
1 vote
3 answers
1k views

Can't add assets to my Bootstrap sub-theme

I'm currently struggling to include *.css and *.js files to my Bootstrap sub-theme. I use Drupal 8 and the Bootstrap 3 base theme. I followed the instructions of the official documentation and went ...
user avatar
  • 161
0 votes
0 answers
54 views

Is it possible to add a dependency file from another module in my module.info?

In the docs: files (Optional) Drupal supports a dynamic-loading code registry. To support it, all modules must declare any code files containing class or interface declarations in the .info ...
user avatar
0 votes
1 answer
595 views

JavaScript files not loading

The JavaScript files for my theme aren't loading. What am I missing? My theme.info.yml: name: theme type: theme description: Custom theme. core: 8.x base theme: classy version: 8.x-1.0 libraries: -...
user avatar
  • 1,005
2 votes
0 answers
2k views

Error: The website encountered an unexpected error. Please try again later [closed]

After I put a new custom theme I did in my theme folder, when I go to my website to install and apply the theme, the site just keeps returning this error: "The website encountered an unexpected ...
user avatar
  • 79
0 votes
2 answers
33 views

Composer module doesn't contain a .info file

So I am quite new to Drupal and I was hoping someone experienced could tell me what I am doing wrong. Essentially, I have Drupal 7.5 linked to my website, but I am having problems installing the ...
user avatar
2 votes
1 answer
236 views

How to add conflicts in D8 info.yml?

I want to know how to add conflicts in D8 info.yml. I tried like this in D8 .info.yml: name: Example type: module description: some example. core: 8.x package: Other dependencies: - menu_ui ...
user avatar
  • 3,548
0 votes
1 answer
75 views

Is it possible to declare a Javascript library dependency at Hook.info? [closed]

Below is my module.info file: name = myid description = Creates an ID template, Inputs ID form, Prints an ID and View System Statistics . core = 7.x package = CSU ;Jquery Library dependencies[] = ...
user avatar
0 votes
2 answers
3k views

Can I add external js and css via module info files?

I have read that I can add js and css file via .info files. Can I add external css and js files there as well? Eg http://somewhere.com/in_a_galaxy
user avatar
  • 4,539
0 votes
2 answers
32 views

Deleting feature[]=logo from .info file, enlarged the whole website font-size?

During the theme learning I deleted the feature[]=logo line from .info file to check its effect at UI. As expected it got deleted from the toggle list at appearance->theme->toggle option. But ...
user avatar
  • 3,675
1 vote
1 answer
54 views

How to exclude recursive module dependencies?

Is there a way to exclude dependencies of dependencies? For example: my_module.info contains dependencies[] = views dependencies[] = ctools my_sub_module.info contains dependencies[] = my_module ...
user avatar
  • 256
0 votes
1 answer
2k views

CSS and JS are not showing

I just started using Drupal 8 and i am already experiencing problems. In my info.yml file I've added library/ies and in my libraries.yml are those files included. And when I clear cache in Admin, the ...
user avatar
  • 183
2 votes
1 answer
101 views

How to define the right dependencies in .info, so drush can understand it?

Currently in my booking_timeslots.info I've the following dependencies: dependencies[] = date dependencies[] = date_views dependencies[] = hierarchical_select dependencies[] = hs_taxonomy ...
user avatar
  • 13.5k
0 votes
1 answer
45 views

including javascript via theme.info doesn't work.

I'm trying to include a simple javascript into my theme using the theme.info It works like a charm on my home-setup but when I try to load in on a real page it doesn't include the .js-files (not ...
user avatar
1 vote
0 answers
24 views

File paths aren't pulling in images or stylesheets

I'm sure I'm not the first person to run into this but I can't find another post about it. I'm pretty new to drupal and I'm taking a swing at theming. I'm running into problems right out of the gate....
user avatar
1 vote
2 answers
154 views

Are absolute paths allowed in info files?

I'm writing a .info file for a module, and I want to include a script which has been installed in /sites/all/libraries: So I have included the line below in my .info file: scripts[] = /sites/all/...
user avatar
1 vote
1 answer
495 views

How do I enable a custom JS file in my Drupal site? [duplicate]

In my Drupal themes' folder I've created a file named "custom-js.js". I created this file to use 2 jQuery manipulations on a small text block that appears in all pages of the site. My question is, ...
user avatar
1 vote
4 answers
2k views

How to include CSS for a custom admin theme?

I want to include my custom style.css in admin pages in Custom Admin theme I have been create. I am including CSS in .info file as follows name = Example Module description = Custom Example Module ...
user avatar
  • 3,548
2 votes
2 answers
191 views

Why are the CSS files in my .info not applied (scripts work fine)?

I have a list of CSS files from a premade theme called artifical reason they are listed in my .info file as such stylesheets[all][] = assets/css/style.css stylesheets[all][] = assets/css/preload.css ...
user avatar
1 vote
1 answer
286 views

Remove js file by template or add condition in info file

I work on drupal 7, I added all js by info file, work well in whole site. But we want to remove or not load of a specific js in a specific content type page. I try by template.php of following code ...
user avatar
4 votes
2 answers
158 views

Can I add a "OR" on a dependecy?

I'm working a on a project that needs to have one of their submodules enable but not both. I was wondering if I can have an or statement in the .info so the user would not enable both submodules. ...
user avatar
0 votes
1 answer
592 views

Add js file in .info theme file. And set it to load first

I added this line in my-theme.info scripts[] = js/my-file.js The files is loads but in last place. I need it to be loaded before all modules js files. How can I set the weight? I also tried (...
user avatar
  • 6,097
0 votes
1 answer
15 views

Does change of .info file need reinstallation of module to take effect?

Does changing a module's .info file require reinstallation of the respective module to take effect?
user avatar
  • 379
0 votes
2 answers
65 views

Difference between .info files hook_menu() file key? [closed]

What is the difference between declaring the files[] in a module's .info file and declaring the file inside a hook_menu() item? According to the Drupal Documentation on .info files... When a ...
user avatar
  • 11
1 vote
3 answers
300 views

Overriding css file in theme.info not working as expected

I am trying to remove nice menus css, as per the notes in my Zen theme .info file. I have added the below to the info file, and I haven't provided replacements in my theme so they should be removed. ...
user avatar
  • 199
0 votes
1 answer
157 views

Need help defining IE specific stylesheet with Zen Starter-kit and Conditional Stylesheet Module

I need help defining a conditional IE stylesheet in my .info file. I am using the Zen starterkit as my base theme, and I have the conditional stylesheet module installed and enabled. I have added an ...
user avatar
  • 70
0 votes
1 answer
311 views

Passing PHP variables to JS file initiated from theme .info file

I know it's perfectly possible to pass PHP variables to JS but what if the JS file is initiated from the theme.info file? Can you access it in template.php or? Please some advice.. Thanks!
user avatar
0 votes
1 answer
93 views

How should I remove a region and zone in an Omega 3 sub theme?

I have a sub theme of Omega 3. What is the correct way to completely remove regions and zones from my sub theme? Is it OK to just simply disable them and then remove them from the .info file? These ...
user avatar
0 votes
0 answers
85 views

Subtheme's newly created CSS files aren't working

I'm currently using Zen for my subtheme, and attempting to add CSS to my .info file, but all my effort is for naught. The .info file is in my subtheme's root, and is named as such - mytheme.info. When ...
user avatar
0 votes
1 answer
251 views

Drupal Isn't Finding My CSS

My stylesheet is mentioned in my .info file, but it's not adding it to the page source and using it. The only style I have in Styles.css is body {background:#444}. I've tried clearing the site's cache ...
user avatar
9 votes
2 answers
2k views

How to make a theme depend on a module?

My theme requires multiple modules to be install before it is fully functional. How can one set module dependency in a theme, so that when a user enables the theme, it will also enable the required ...
user avatar
  • 807
1 vote
1 answer
55 views

What is the Drupal API for reading Drupal configuration files (.info .make etc.)?

Drupal configurations such as .info, .make appear to follow common structure. There must be Drupal API for reading these configurations from code. How does one load and read these configurations in ...
user avatar
  • 807
1 vote
1 answer
183 views

Using an include file from a different module

I've got a module that I've created just for the sole purpose of sharing .inc files between multiple modules. The modules .module file is empty, as it doesn't do anything. But in the modules .info ...
user avatar
0 votes
1 answer
55 views

Include files used by multiple modules

I have some include files (.inc) that have classes in them that are used by multiple modules. Where should these be stored so that they are accessible to files[] in a modules .info file? Preferably ...
user avatar
0 votes
1 answer
231 views

How to edit live theme .info file (localhost)

I'm currently building a custom theme from the ground up on drupal on localhost. At the moment I've managed to add my theme and run my custom templates succesfully. However I can't get it to pick up ...
user avatar
4 votes
1 answer
119 views

When should the dependency from a core module be explicit?

The Standard profile declares the Node module as one of the modules it requires, and so does the Minimal profile. That is not true for the History module, which is required from the former but not the ...
user avatar
  • 93.8k
9 votes
1 answer
2k views

Adding a dependencies in theme info file

Can I use dependencies[] = module name in the theme.info file? I want to create a drupal theme where I using some dependencies module, if I able to mention the dependencies in theme info it will easy ...
user avatar
2 votes
1 answer
2k views

Separate classes in include file not loading?

I have a peculiar problem... I'm trying to simplify my module by breaking up a ton of code into classes, and I have all of the classes in a separate include file that I'm registering in my .info file ...
user avatar
4 votes
3 answers
11k views

Is there any way to force https:// to be used for assets and still be able to define a theme CSS files in its .info file?

I have a theme which defines its CSS files in its .info file, for example with a line like the following. stylesheets[all][] = css/style.min.css The site is accessed using https://, but for some ...
user avatar
  • 105