WillStrohl / dnnextensions

One solution. Multiple extensions. No pain. A collection of DNN modules and other extensions.
https://upendoventures.com/dnn-extensions
MIT License
39 stars 18 forks source link

Content Injection 2.0.2 - cannot add any injections #169

Open David-12345 opened 6 years ago

David-12345 commented 6 years ago

Hi, I'm using 2.0.2 on DNN 8.0.3. I've installed the module and placed on a page. I have tried to Add New Injection, first with Google Analytics script code, then with a simple Google font CSS code. Neither worked. When I click Submit, the pop-up contents flash briefly but nothing happens - no warning or error is displayed. I attach a couple of screenshots showing what I was attempting to enter for the Google Font: manage-injection-1 manage-injection-2

WillStrohl commented 6 years ago

Are you seeing any exceptions logged when this occurs?

WillStrohl commented 6 years ago

Also, are there any client-side errors in the web developer tools console?

David-12345 commented 6 years ago

Hi Will,

OK, I switched to HTML (not Javascript/CSS) and it works fine. I was concerned as the only options were top or bottom of page. So I assumed this meant top or bottom of . But no, the CSS reference appears in the . But this is CSS - Am I misunderstanding what the Javascript/CSS and HTML options mean??

When injecting Google Analytics code I selected Javascript/CSS (as it's javascript!) should that be HTML too? If so, what is the Javasript/CSS option used for?

Thanks!

david-poindexter commented 6 years ago

You need to switch the Injection Type to HTML because you are actually adding HTML.

David-12345 commented 6 years ago

Just noticed words were removed from my reply. Should read: I was concerned as the only options were top or bottom of page. So I assumed this meant top or bottom of the body. But no, the CSS reference appears in the head as desired. Where is the documentation for this module? It would be quite useful as I was puzzling over the Priority section too.

djfenske commented 3 years ago

I am happy to find this module, a good replacement for the discontinued DNNStuff module. I was working under the same misconception as David-12345: to me, injecting CSS would be adding the link element (but as D. Poindexter points out, that's actually an HTML element). The hover tips specify that JSS/CSS should be a file path. I tried just the relative path to a CSS file, minus the link element, but that didn't work either. So is this asking for a server file system path? An absolute URL? I'm sure it works one way or another... but for now the HTML placement works fine for what I need. Thanks, guys!