Timeline for Unable to load css files using ['#attached'] or drupal_add_css
Current License: CC BY-SA 4.0
10 events
| when toggle format | what | by | license | comment | |
|---|---|---|---|---|---|
| Jun 9, 2019 at 4:06 | answer | added | Ghoti | timeline score: 1 | |
| Jun 9, 2019 at 1:57 | comment | added | Jaypan | Nothing useful in that D8 link for your situation. Sorry, they seemed related but I didn't think it through. | |
| Jun 9, 2019 at 0:20 | comment | added | Ghoti | I am not dschoni and am using Drupal 7, not Drupal 8. I'll work through the Drupal 8 documentation that you linked and see if I can find anything useful. Also reviewing your comment. | |
| Jun 9, 2019 at 0:15 | history | edited | Jaypan | edited tags | |
| Jun 9, 2019 at 0:15 | comment | added | Jaypan | Are you dschoni? I just made this comment which seems relevant to your issue, though maybe just coincidentally: drupal.org/node/2216195/discuss#comment-13138748 | |
| Jun 9, 2019 at 0:13 | comment | added | Ghoti | Just tried removing the index names (ie from $form['#attached']['css']['css1'] to $form['#attached']['css'][]). No luck. Guess that shouldn't be too surprising given drupal_add_css() also fails. | |
| Jun 9, 2019 at 0:06 | history | edited | Ghoti | CC BY-SA 4.0 | Added additional information to support my question |
| Jun 8, 2019 at 23:57 | comment | added | Ghoti | I've checked the HTML source in the browser to verify what is/isn't loading. Attempts to add css marked "//failed" were not found in the source. I'll update question with additional code. | |
| Jun 8, 2019 at 23:51 | comment | added | Jaypan | Look at the HTML source in the browser, and search for the filename without the path. Is the filename in the source? Then you've either linked it incorrectly, or there are file permission problems preventing it from being loaded. If the filename is not found in the source, it means you're doing it incorrectly in Drupal. What function have you added the above code into? Without context, we can't tell if you are doing it right or wrong. Also, I've never attached libraries with named indexes before - it's probably not a problem, but it's the one question that stands out for me looking at the code | |
| Jun 8, 2019 at 23:15 | history | asked | Ghoti | CC BY-SA 4.0 |