Errors in ascx control when getting ModuleID() - dotnetnuke

In Visual Studio I've been always getting the following errors when getting ModuleID in ascx, but the module compiles successfully. Any ideas how to fix these issues?
This is how I register the ascx:
<%# Control Language="vb" AutoEventWireup="true" CodeBehind="View.ascx.vb" Inherits="Christoc.Modules.babyList.View" %>

Try this code to access your Moduleid in ascx file
<%= ModuleId %>

Related

undefined method `javascript_pack_tag' for #<ActionView::Base:0x0000000000a730>

I am currently working with webpacker currently shakapacker. The structure of my generated app using rails new react-app --webpack=reactis app/javascript/application.js and not as shown below
I have tried adding the packs folder manually. when I add <%= javascript_pack_tag 'hello_react' %> in app/views/layouts/applcation.html.erb it gives me this error
NoMethodError in Pages#index
Showing /home/gatwiri/react-app/app/views/layouts/application.html.erb where line #8 raised:
undefined method `javascript_packs_tag' for #<ActionView::Base:0x0000000000ae60>
Did you mean? javascript_path
controller generation
rails g controller pages index
/config/routes.rb
Rails.application.routes.draw do
root 'pages#index'
end
NB: expected output hello react
What I have tried
using tag instead of tag_pack
I downgraded my rails to rails 6.1.0 and restarted the project and everything worked okay

Ruby on Rails, TailwindCSS and React very slow compile times

I am trying out RoR for an upcoming project and have hit an interesting snag with the tools I am trying to use. The project was setup using rails new app --database postgresql --webpack react which worked great for quickly embedding react into the app.
Where I find issue is when I try and add TailwindCSS to the mix, it works, but it is EXTREMELY slow. 1 line changes in react code are triggering full webpack recompiles which are taking upwards of 40-50 seconds per refresh which just isn't viable.
I have looked around and even tried to implement TailwindCSS JIT which was a headache in itself but also did not fix my issue. I also could not find anything really specific around my exact configuration (react and tailwind) and how to fix this particular issue.
Here is my config:
// app/javascript/packs/application.js
import Rails from "#rails/ujs"
import Turbolinks from "turbolinks"
import * as ActiveStorage from "#rails/activestorage"
import "channels"
import "stylesheets/application" // I have tried with and without this...
Rails.start()
Turbolinks.start()
ActiveStorage.start()
// app/javascript/stylesheets/application.css
#import "tailwindcss/base";
#import "tailwindcss/utilities";
#import "tailwindcss/components";
// app/views/layouts/application.html.erb
...
<%= stylesheet_link_tag 'application', media: 'all', 'data-turbolinks-track': 'reload' %>
<%= stylesheet_pack_tag 'application', 'data-turbolinks-track': 'reload' %>
<%= javascript_pack_tag 'application', 'data-turbolinks-track': 'reload' %>
<%= javascript_pack_tag 'index' %>
</head>
...
Is there somewhere I can place the application.css import so it doesn't compile everytime I make a change in react?
Thanks in advance.
I use this gem on my project https://github.com/rails/tailwindcss-rails
the tailwind.css is included https://github.com/rails/tailwindcss-rails/blob/main/app/assets/stylesheets/tailwind.css
and will purge unused css on production env

Getting an Error in my Manifest file on React App

I am brand new to React, and am following a tutorial on Sololearn. When I created my own project, and opened it in VS code, I ran it with Live Server. It worked just fine for a while, then suddenly quit working and said that I had an error in my Manifest File and line 1Image of errors
I did not touch the manifest file, I hadn't even opened it yet. I tried creating a whole new project, and got the same error right off the bat. Anyone have any suggestions on how to fix?
There will be a reference to manifest.json in project,fle or resource itself does not exist.
and check whether you've any link tags with rel=manifest same of
<link rel="manifest" href="/manifest.webmanifest">
.webmanifest extension is specified in the Media type registration section of the specification, but browsers generally support manifests with other appropriate extensions like .json.
ie
<link rel="manifest" href="/manifest.json">
and remove it from the code to stop the error.

Templates are not loading in IE11

My ui-router and custom directive templates are not loading in Internet Explorer 11. This is the error for each one:
[$compile:tpload] Failed to load template: blah/blah.html (HTTP status: undefined undefined)
Everything is working fine in Chrome, Firefox and Edge.
Any pointers or guesses of why this maybe happening would be greatly appreciated.
For JavaScript, In Internet Explorer, there is normally an issue because of 'use-strict' mode. If your application appears to somewhere have an object with two properties of the same name, 'use-strict' will cause it to crash.
For HTML, there must be a missing closing or an opening tag which is not rendering the pages
OK, this is fixed. There was an ES6 endsWith() method being used which is unsupported in IE11. There was no error regarding this in the console - I found the issue by ensuring "Break on all exceptions" was select in the IE dev tools debugger. The fix was to simply add a polyfill https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/endsWith

Error after downloading HotTowel.Angular

I created an empty web solution, added an empty web application, used following NuGet command to download HotTowel.Angular template,
Install-Package HotTowel.Angular -pre
Executed the project and as soon as I run my web application it shows splash screen then, I get following error:-
{{VM.BUSYMESSAGE}}
Any idea why is that ?
I get the same error after updating to jQuery 2.1.3. I do not get this error with the default template issued version of 2.1.1.
UPDATE: It turns out I forgot to change the version in the script reference to jQuery on the index.html page to match the library. So check that out on your end and you should have your solution.
I have same problem. I tried both installing it via nuget package and package manager console. No Luck. Showing {{ VM.BUSYMESSAGE }} on screen. Error is showing $ is undefined. Looks like it is problem related to jQuery.
Unhandled exception at line 7, column 38 in scripts/bootstrap.js
0x800a139e - JavaScript runtime error: Bootstrap's JavaScript requires jQuery
index.html page contain:
<script src="scripts/jquery-2.1.1.js"></script>
Check your jQuery version and update to
<script src="scripts/jquery-2.1.N.js"></script>
//In my case
<script src="scripts/jquery-2.1.4.js"></script>

Resources