Starts in:
2 DAYS
0 HR
53 MIN
22 SEC
Starts in:
2 D
0 H
53 M
22 S
Open Closed

Using global script contributor on a different theme (global script contributor loads the scripts, but scripts do not work) #1114


User avatar
0
uyarbtrlp created
  • ABP Framework version: v4.2.1
  • UI type: MVC
  • DB provider: EF Core
  • Tiered (MVC): yes
  • Exception message and stack trace:
  • Steps to reproduce the issue:

Hello, We have been working on our theme project. It is based on the Lepton Theme that you have created. We have taken all methods from the Lepton theme, such as what you have done for creating layouts, components and have changed it to our layout styles, components, etc. Briefly, we have overridden the Lepton Theme. We have added script contributor (like LeptonGlobalScriptContributor) for adding theme scripts. It loads the scripts for what we need for UI interaction. However, if I try to do something related to our scripts, pages do not run the script methods, etc. If we add scripts to the layout page with script html tag, scripts work fine. We can do anything related to our scripts. If we remove the scripts that are custom scripts for our theme from script contributor, scripts do not work again. We need to add our scripts not only to the contributor but also to the layout page. It is just related to our custom scripts. Scripts that come from ABP work fine. Here is the application layout: As you can see, scripts load both times because of adding to application layout and script contributor. How can we take the scripts from the contributor and provide those scripts to run?


10 Answer(s)
  • User Avatar
    0
    maliming created
    Support Team Fullstack Developer

    hi uyarbtrlp

    Can you share a project or steps to reproduce the issue?

  • User Avatar
    0
    uyarbtrlp created

    How can I send the project to you?

  • User Avatar
    0
    maliming created
    Support Team Fullstack Developer

    hi

    You can share it by email. liming.ma@volosoft.com

  • User Avatar
    0
    uyarbtrlp created

    I sent it. Thanks.

  • User Avatar
    0
    maliming created
    Support Team Fullstack Developer

    hi

    if I try to do something related to our scripts, pages do not run the script methods, etc.

    I've download your theme, Can you share the steps to reproduce?

    I think these are not necessary.

  • User Avatar
    0
    uyarbtrlp created

    We have copied the Lepton theme folders (such as Bundling, Toolbars) and the components inside the Theme -> Lepton. We have added theme's css and styles to Themes -> Global -> Scripts and Styles. We have have created the components like Toolbar, Tools, Header . We have used your logic to create the components content. The content are the same but the html codes that inside the components are different from yours. Finally, we have added our scripts and styles to global script contributor and global style contributor. We have thought it works smoothly, but we have noticed this problem on dropdown menu. If I remove these scripts, the dropdown menus do not work. However, other components are working flawlessly. The problem is here. You can see that on language component used on Application layout. Scripts work, but the dropdown menus do not. We cannot see the panel that drop down menu includes other languages. This problem also applies to other drop down menus.

  • User Avatar
    0
    maliming created
    Support Team Fullstack Developer

    hi uyarbtrlp

    Can I check it remotely? My local test did not reproduce the problem.

  • User Avatar
    0
    uyarbtrlp created

    Yeah, of course. How can we make it?

  • User Avatar
    0
    maliming created
    Support Team Fullstack Developer

    hi

    My work hours is UTC+8. You can send me an email when you're available. liming.ma@volosoft.com

  • User Avatar
    0
    ServiceBot created
    Support Team Automatic process manager

    This question has been automatically marked as stale because it has not had recent activity.

Made with ❤️ on ABP v9.1.0-preview. Updated on November 20, 2024, 13:06