Questions tagged [.info]

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

Filter by
Sorted by
Tagged with
0 votes
1 answer
54 views

My custom module shows up on the modules list but I cannot enable it, why?

I've written a custom module (custom_data_import) with a .info.yml file and .module files, but the module only shows up in my list of modules and I cannot enable it. Moreover, the .module file seems ...
acey's user avatar
  • 19
3 votes
1 answer
61 views

Custom module name conflicts with unsupported contrib module -- how to avoid "This project is no longer supported" warning?

This Drupal 9 site runs a fork of the search_file_attachments module, modified for custom purposes, and for Drupal 9 compatibility. For some time now, the Available updates report has shown, for this ...
TwoMice's user avatar
  • 131
-2 votes
1 answer
170 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 ...
commonpike's user avatar
2 votes
0 answers
302 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/...
rickdenhaan's user avatar
6 votes
1 answer
2k 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/...
Max Starkenburg's user avatar
1 vote
1 answer
37 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?
Adrian Cid Almaguer's user avatar
0 votes
1 answer
53 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 ...
ectuser's user avatar
4 votes
3 answers
4k views

How can I disable CSS styles from a core module 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-...
Nate Dillon's user avatar
0 votes
1 answer
35 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-...
Tyler Shuster's user avatar
0 votes
1 answer
498 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 ...
Alireza Tabatabaeian's user avatar
3 votes
1 answer
170 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 ...
Adrian Cid Almaguer's user avatar
5 votes
2 answers
374 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 ...
amit's user avatar
  • 444
0 votes
1 answer
97 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: - ...
Pim's user avatar
  • 1,045
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 ...
Zephyr's user avatar
  • 161
0 votes
0 answers
56 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 ...
Gianni Di Falco's user avatar
0 votes
1 answer
669 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: -...
Pim's user avatar
  • 1,045
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 ...
racemi's user avatar
  • 79
0 votes
2 answers
35 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 ...
user67339's user avatar
2 votes
1 answer
251 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 ...
Ajay Reddy's user avatar
  • 3,829
0 votes
1 answer
77 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
giorgio79's user avatar
  • 4,597
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 ...
CodeNext's user avatar
  • 3,723
1 vote
1 answer
58 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 ...
John R's 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 ...
ZeroByte's user avatar
  • 183
2 votes
1 answer
102 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 ...
kenorb's user avatar
  • 14.1k
0 votes
1 answer
47 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 ...
hugo584's user avatar
1 vote
0 answers
26 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....
Jonathan's user avatar
1 vote
2 answers
158 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/...
Monkeybrain's user avatar
1 vote
1 answer
562 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
3k 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 ...
Ajay Reddy's user avatar
  • 3,829
2 votes
2 answers
192 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 ...
Matt Beal's user avatar
1 vote
1 answer
337 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 ...
Rituraj Kumar's user avatar
4 votes
2 answers
161 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. ...
itsdarrylnorris's user avatar
0 votes
1 answer
631 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 (...
chefnelone's user avatar
  • 6,227
0 votes
1 answer
16 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?
Ehsan's 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 ...
Nick's user avatar
  • 11
1 vote
3 answers
303 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. ...
davewilly's user avatar
  • 309
0 votes
1 answer
160 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 ...
e.shell's user avatar
  • 70
0 votes
1 answer
323 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!
Pieter Moeyersons's user avatar
0 votes
1 answer
97 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 ...
Carl Bowles's 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 ...
Bakajuice's user avatar
0 votes
1 answer
252 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 ...
PatBranch's 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 ...
latvian's user avatar
  • 807
1 vote
1 answer
57 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 ...
latvian's user avatar
  • 807
1 vote
1 answer
208 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 ...
Arak Tai'Roth's user avatar
0 votes
1 answer
58 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 ...
Arak Tai'Roth's user avatar
0 votes
1 answer
235 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 ...
Joe Taylor's user avatar
4 votes
1 answer
120 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 ...
apaderno's user avatar
  • 97k
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 ...
Aryashree Pritikrishna's 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 ...
Lester Peabody's user avatar