Quantcast
Channel: Using modifyClass for objects which are initialized early in boot
Browsing latest articles
Browse All 15 View Live

Using modifyClass for objects which are initialized early in boot

When using modifyClass in an initializer, you may see this warning in the console: (type) has already been initialized and registered as a singleton. Move the modifyClass call earlier in the boot...

View Article


Using modifyClass for objects which are initialized early in boot

How would one go about this for a theme component? I’m trying to configure a modified version of this theme component (here), and this is the only error I cannot figure out how to resolve on my own....

View Article


Image may be NSFW.
Clik here to view.

Using modifyClass for objects which are initialized early in boot

@Firepup650 did you follow this? Use an ID in a custom user field to link to a user's external profile admins Let’s say you want to add a link of User’s main profile page on Discourse user profile...

View Article

Image may be NSFW.
Clik here to view.

Using modifyClass for objects which are initialized early in boot

Using that throws this slew of errors: DEPRECATION: Function prototype extensions have been deprecated, please migrate from function(){}.property('bar') to computed('bar', function() {}). [deprecation...

View Article

Image may be NSFW.
Clik here to view.

Using modifyClass for objects which are initialized early in boot

David Taylor: assets/javascripts/discourse/pre-initializers/extend-user-for-my-plugin.js @Firepup650 - looking at your repository, looks like you still need to create this pre-initializer js file for...

View Article


Using modifyClass for objects which are initialized early in boot

Would I put it in that exact location? Partially asking, because I only just moved it to a repository, and I don’t think I could do that via the Theme Component editor. Read full topic

View Article

Using modifyClass for objects which are initialized early in boot

you likely need to create a structure and js file setup similar to this (sorry i couldn’t find a pre-initializer example) github.com...

View Article

Image may be NSFW.
Clik here to view.

Using modifyClass for objects which are initialized early in boot

Firepup Sixfifty: Theme Component editor. i really only use this for testing code tweaks. i always work off my repositories or forks when it comes to theme components. Read full topic

View Article


Using modifyClass for objects which are initialized early in boot

Trying to follow that, but I think I made it worse: [THEME 62 'Profile link'] Compile error: SyntaxError: /discourse/theme-62/initializers/theme-field-399-common-html-script-1: Unexpected token,...

View Article


Using modifyClass for objects which are initialized early in boot

I should check and make sure I’ve properly cleaned up stuff like an extra }); in the future. Now I no longer get errors, but it doesn’t work either. Read full topic

View Article

Image may be NSFW.
Clik here to view.

Using modifyClass for objects which are initialized early in boot

i use vs code with prettier extension to do this sort of cleanup and formatting. Firepup Sixfifty: Now I no longer get errors, but it doesn’t work either. keep trying, you’ll get it. you’re probably...

View Article

Using modifyClass for objects which are initialized early in boot

I now just have a depreciation warning, and I can’t figure out what’s triggering it: DEPRECATION: Passing the `@class` argument to <LinkTo> is deprecated. Instead, please pass the attribute...

View Article

Using modifyClass for objects which are initialized early in boot

Got too annoyed with the pre-initializer, and switched the component to pull the user_fields and then just extract the one with the correct ID. As far as I could tell, the pre-initializer never got...

View Article


Image may be NSFW.
Clik here to view.

Using modifyClass for objects which are initialized early in boot

Firepup Sixfifty: As far as I could tell, the pre-initializer never got fired by the component For someone trying to get this to work and hitting the same problem, I only managed to get the...

View Article

Image may be NSFW.
Clik here to view.

Using modifyClass for objects which are initialized early in boot

Aha, thanks @mentalstring and @Lilly for finding this. The example in the OP was for a plugin, which has a subtly different directory structure to a theme. I’ve now updated it to include example file...

View Article

Browsing latest articles
Browse All 15 View Live