Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Inline editing tools break when composite files are turned on #3999

Open
4 tasks done
cklenk opened this issue Aug 19, 2020 · 17 comments
Open
4 tasks done

Inline editing tools break when composite files are turned on #3999

cklenk opened this issue Aug 19, 2020 · 17 comments

Comments

@cklenk
Copy link

cklenk commented Aug 19, 2020

Description of bug

Admin users are unable to edit module titles and html inline on pages once you turn on composite files with css and js minification.

Steps to reproduce

List the precise steps to reproduce the bug:

  1. Go to settings => servers
  2. Click on server settings and then performance tab
  3. Toggle composite files with minify css and js
  4. Go to a page with an html module and turn on edit mode

Current behavior

No inline edit options appear on page.

Expected behavior

Inline edit options should appear on page when in edit mode.

Screenshots

image
image
no edit options ^
image
image
edit options are back ^

Error information

image
js:1 GET http://dnndev.me/dnn.controls.dnntoolbar.js net::ERR_ABORTED 404 (Not Found)
load @ js:1
reload @ js:1
(anonymous) @ ScriptResource.axd?d=NJmAwtEo3Iom9WbGssqM6-DJCNmo93xOc4N0RsIRrIhYEPH02vdOCuGu89kXln6NuzKgmqczps6vzSMrNoDE4aJhHBIScz7NXwRL_hCXvPTMtfCsALHdt8QYtRZVnDIZsFCD8Q2&t=2a797f5c:5
complete @ js:1
(anonymous) @ ScriptResource.axd?d=NJmAwtEo3Iom9WbGssqM6-DJCNmo93xOc4N0RsIRrIhYEPH02vdOCuGu89kXln6NuzKgmqczps6vzSMrNoDE4aJhHBIScz7NXwRL_hCXvPTMtfCsALHdt8QYtRZVnDIZsFCD8Q2&t=2a797f5c:5
setTimeout (async)
doDelay @ js:1
load @ js:1
loadScript @ js:1
initToolbar @ js:225
showToolBar @ js:225
(anonymous) @ ScriptResource.axd?d=NJmAwtEo3Iom9WbGssqM6-DJCNmo93xOc4N0RsIRrIhYEPH02vdOCuGu89kXln6NuzKgmqczps6vzSMrNoDE4aJhHBIScz7NXwRL_hCXvPTMtfCsALHdt8QYtRZVnDIZsFCD8Q2&t=2a797f5c:5
b @ ScriptResource.axd?d=NJmAwtEo3Iom9WbGssqM6-DJCNmo93xOc4N0RsIRrIhYEPH02vdOCuGu89kXln6NuzKgmqczps6vzSMrNoDE4aJhHBIScz7NXwRL_hCXvPTMtfCsALHdt8QYtRZVnDIZsFCD8Q2&t=2a797f5c:5

Affected version

  • 09.06.02 latest supported release
  • 09.06.01

Affected browser

  • Chrome
  • Microsoft Edge Chromium
@stale
Copy link

stale bot commented Nov 19, 2020

We have detected this issue has not had any activity during the last 90 days. That could mean this issue is no longer relevant and/or nobody has found the necessary time to address the issue. We are trying to keep the list of open issues limited to those issues that are relevant to the majority and to close the ones that have become 'stale' (inactive). If no further activity is detected within the next 14 days, the issue will be closed automatically.
If new comments are are posted and/or a solution (pull request) is submitted for review that references this issue, the issue will not be closed. Closed issues can be reopened at any time in the future. Please remember those participating in this open source project are volunteers trying to help others and creating a better DNN Platform for all. Thank you for your continued involvement and contributions!

@stale stale bot added the stale label Nov 19, 2020
@stale
Copy link

stale bot commented Dec 3, 2020

This issue has been closed automatically due to inactivity (as mentioned 14 days ago). Feel free to re-open the issue if you believe it is still relevant.

@stale stale bot closed this as completed Dec 3, 2020
@cklenk
Copy link
Author

cklenk commented Dec 7, 2020

Reopen please - this is still an issue.

Thanks
-Cameron

@roman-yagodin
Copy link
Contributor

roman-yagodin commented Feb 24, 2021

Same issue here on DNN 9.9.0, please reopen!

Message from browser console:

Uncaught TypeError: dnn.controls.DNNToolBar is not a constructor
    initToolbar http://copy-1.volgau.com/DependencyHandler.axd/8f32d5990f235ed25853ed52140abfd9/2/js:204
    createDelegate http://copy-1.volgau.com/ScriptResource.axd?d=NJmAwtEo3IqwuzsiGd55-Lm6etSwdhpUUFDUz9yAj0QhFEregizcz1CP5W2GXqMyi9ePvhYWrFCtlfUT7hdOQJU9QhusJRUvPHdI46kIpssLP-yKE3vUL6FrzKQ3IhBPK8XeGQ2&t=ffffffffcd368728:5
    complete http://copy-1.volgau.com/DependencyHandler.axd/8f32d5990f235ed25853ed52140abfd9/2/js:1
    reload http://copy-1.volgau.com/DependencyHandler.axd/8f32d5990f235ed25853ed52140abfd9/2/js:1
    createDelegate http://copy-1.volgau.com/ScriptResource.axd?d=NJmAwtEo3IqwuzsiGd55-Lm6etSwdhpUUFDUz9yAj0QhFEregizcz1CP5W2GXqMyi9ePvhYWrFCtlfUT7hdOQJU9QhusJRUvPHdI46kIpssLP-yKE3vUL6FrzKQ3IhBPK8XeGQ2&t=ffffffffcd368728:5
    complete http://copy-1.volgau.com/DependencyHandler.axd/8f32d5990f235ed25853ed52140abfd9/2/js:1
    createDelegate http://copy-1.volgau.com/ScriptResource.axd?d=NJmAwtEo3IqwuzsiGd55-Lm6etSwdhpUUFDUz9yAj0QhFEregizcz1CP5W2GXqMyi9ePvhYWrFCtlfUT7hdOQJU9QhusJRUvPHdI46kIpssLP-yKE3vUL6FrzKQ3IhBPK8XeGQ2&t=ffffffffcd368728:5

@roman-yagodin
Copy link
Contributor

roman-yagodin commented Mar 9, 2021

Strangely, in some cases the inline editing works just fine. In others (on the same site) - it just don't want to (see screenshot).

Screenshot from 2021-03-09 14-53-26

Please reopen!

@bdukes bdukes reopened this Mar 9, 2021
@stale stale bot removed the stale label Mar 9, 2021
@stale
Copy link

stale bot commented Jun 9, 2021

We have detected this issue has not had any activity during the last 90 days. That could mean this issue is no longer relevant and/or nobody has found the necessary time to address the issue. We are trying to keep the list of open issues limited to those issues that are relevant to the majority and to close the ones that have become 'stale' (inactive). If no further activity is detected within the next 14 days, the issue will be closed automatically.
If new comments are are posted and/or a solution (pull request) is submitted for review that references this issue, the issue will not be closed. Closed issues can be reopened at any time in the future. Please remember those participating in this open source project are volunteers trying to help others and creating a better DNN Platform for all. Thank you for your continued involvement and contributions!

@stale stale bot added the stale label Jun 9, 2021
@roman-yagodin
Copy link
Contributor

Bump!

@stale stale bot removed the stale label Jun 9, 2021
@stale
Copy link

stale bot commented Sep 21, 2021

We have detected this issue has not had any activity during the last 90 days. That could mean this issue is no longer relevant and/or nobody has found the necessary time to address the issue. We are trying to keep the list of open issues limited to those issues that are relevant to the majority and to close the ones that have become 'stale' (inactive). If no further activity is detected within the next 14 days, the issue will be closed automatically.
If new comments are are posted and/or a solution (pull request) is submitted for review that references this issue, the issue will not be closed. Closed issues can be reopened at any time in the future. Please remember those participating in this open source project are volunteers trying to help others and creating a better DNN Platform for all. Thank you for your continued involvement and contributions!

@stale stale bot added the stale label Sep 21, 2021
@sleupold
Copy link
Contributor

might be still an issue

@stale stale bot removed the stale label Sep 22, 2021
@cklenk
Copy link
Author

cklenk commented Sep 24, 2021

Yes this is still an issue in 9.10.1.

Thanks
Cameron

@Navilois
Copy link

Same issue here - 9.8.1

@QuintinHumphreys
Copy link

no answers, workarounds or updates in over 2 years? I'm on DNN 9.11.1 and still an issue.

@mitchelsellers
Copy link
Contributor

@QuintinHumphreys DNN is an open source project supported 100% by volunteers. We do our best, sadly some of these items for less-used features in specific configurations aren't the most popular items to address.

@QuintinHumphreys
Copy link

QuintinHumphreys commented Mar 17, 2023

@QuintinHumphreys DNN is an open source project supported 100% by volunteers. We do our best, sadly some of these items for less-used features in specific configurations aren't the most popular items to address.

no problems, i understand. in case anyone else is experiencing this issue, a quick workaround to the issue is to create a file in the root of your website called dnn.controls.dnntoolbar.js with the content:

//assuming jquery is available

$(document).ready(function(){
    $('body').append($('<script src="/js/dnn.controls.dnntoolbar.js"></script>'));
});

@mitchelsellers
Copy link
Contributor

@QuintinHumphreys This is great, let us see if we can figure out how to fix that specific path

@ufoloko
Copy link
Contributor

ufoloko commented Nov 27, 2023

I dont know if you found the issue about this bug.

The error is because this function dnn.dom.getScriptPath() get path according to where is located file "/js/dnn.js", so, this will return correct path if file is included in <script> tags. When you enable composite files, this <script src="/js/dnn.js"> tag doesn´t exist so function dnn.dom.getScriptPath() returns empty, so any file using that function will retrieve bad root.

As a quick patch i have added this script into my skin

<script src="/js/dnn.js" type="text/javascript"></script>

With this Im avoiding composite files, so when some part of the site calls dnn.dom.getScriptPath() function, this retrieves the correct scripts path.

@bdukes
Copy link
Contributor

bdukes commented Nov 27, 2023

Thanks for the detective work @ufoloko! It looks like that dnn.dom.getScriptPath function falls back to reading a client variable named __sp, which appears to only be registered by ClientAPI.RegisterClientScriptBlock. So, theoretically, if the code that includes the inline editing tools registered that variable, this would start working.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

9 participants