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

[Go to field] and Field Inspector don't work anymore #134

Closed
MidasVE opened this issue Sep 28, 2020 · 8 comments
Closed

[Go to field] and Field Inspector don't work anymore #134

MidasVE opened this issue Sep 28, 2020 · 8 comments
Assignees
Labels
Milestone

Comments

@MidasVE
Copy link

MidasVE commented Sep 28, 2020

Steps to Reproduce the Problem

  1. Go to a field in Sitecore
  2. Click on field title or [Go to field] link next to it

Expected Behavior

The link goes to the template of the field/the field title shows the name.

Actual Behavior

It keeps being stuck on '[Loading]'
image

Specifications

Sitecore version: 9.0.2
On Microsoft Edge, Google Chrome

@alan-null
Copy link
Owner

@MidasVE does it still fail for you?
Th first usage (after restart) of field name inspector or go to field action button might be slow.

My suspicion is that extension was unable to load information from dbbrower before you clicked something else.
First dbbrowser load always takes longer, once it's initialized everything should work really fast (you can open chrome dev tools and inspect Network tab)

I cannot reproduce the problem on 9.1. I am constantly using it and don't think that there is something seriously broken there.

If you can reproduce the problem could you check console output in your browser?
That could shed some light on the potential problem that doesn't appear on my side.

@MidasVE
Copy link
Author

MidasVE commented Oct 13, 2020

Hi @alan-null
Thanks for your answer.
This is what I get in the console once I click on the 'go to field' link:

: Uncaught SyntaxError: Failed to execute 'querySelector' on 'Document': '[data-sectionid='','','ToggleSection("Blog Overview","0")-0']:not([data-fieldid])' is not a valid selector.
i.cerror @ jsnlog.min.js:1
i.sendLogItemsConsole @ jsnlog.min.js:1
i.sendBatch @ jsnlog.min.js:1
i.log @ jsnlog.min.js:1
n.log @ jsnlog.min.js:1
n.error @ jsnlog.min.js:1
window.onerror @ jsnlog.min.js:1

Application.js:3 Uncaught DOMException: Failed to execute 'querySelector' on 'Document': '[data-sectionid='','','ToggleSection("Blog Overview","0")-0']:not([data-fieldid])' is not a valid selector.
    at getSectionID (chrome-extension://dcbilinfbmohfdhjdekgpgpkcbhmfipl/sc_ext/Application.js:3:15615)
    at XMLHttpRequest.<anonymous> (chrome-extension://dcbilinfbmohfdhjdekgpgpkcbhmfipl/sc_ext/Application.js:3:15796)
getSectionID @ Application.js:3
(anonymous) @ Application.js:3
load (async)
HttpRequest.execute @ Application.js:2
FieldInspectorModule.getItemFields @ Application.js:3
FieldInspectorModule.initFieldIDs @ Application.js:3
FieldInspectorModule.ensureFieldsInitialized @ Application.js:3
spanGoToField.onclick @ Application.js:3

jsnlog.min.js:1 : Uncaught TypeError: Cannot read property 'attributes' of null
i.cerror @ jsnlog.min.js:1
i.sendLogItemsConsole @ jsnlog.min.js:1
i.sendBatch @ jsnlog.min.js:1
i.log @ jsnlog.min.js:1
n.log @ jsnlog.min.js:1
n.error @ jsnlog.min.js:1
window.onerror @ jsnlog.min.js:1

Application.js:3 Uncaught TypeError: Cannot read property 'attributes' of null
    at XMLHttpRequest.<anonymous> (Application.js:3)
(anonymous) @ Application.js:3
load (async)
HttpRequest.execute @ Application.js:2
FieldInspectorModule.getFieldID @ Application.js:3
spanGoToField.onclick @ Application.js:3

@alan-null
Copy link
Owner

@MidasVE Thank you. that's really helpful.
I will take a look on it.

@alan-null alan-null added this to the 3.4.0 milestone Oct 13, 2020
@alan-null
Copy link
Owner

@MidasVE I tried to reproduce it but without any luck 😐

Do you have other browser extensions that could influence sc_ext functionality (specifically those changing HTML)?
String "ToggleSection" looks weird to me because normally you will find "toggleSection" (camelCase, first letter lowercased)
Does it happen for every field? (what's gonna happen if you will inspect Title field of default Home item?)
image

If possible could you inspect HTML and show me section onclick value?
image

This is from where the code gets part of the selector from

@MidasVE
Copy link
Author

MidasVE commented Oct 14, 2020

Hi @alan-null

Ok, I've looked at it in Incognito mode to disable all cookies/other extensions and if I look at for example the 'Data' tab of the standard homepage I get this:
image
As you can see, it somehow also has that 'ToggleSection' instead of 'toggleSection'. I have no other extensions enabled, so I'm not sure why it's capitalizing that first letter there.
This happens on all fields.

Thanks for your help!

@alan-null
Copy link
Owner

@MidasVE Thank you for checking! I was able to reproduce it.

Here is how you can make it work again.
rendercollapsedsections

I wasn't aware of this. Actually this seem to be cool a feature (not rendering sections which are closed).
This is temporary workaround, I will see what I can do to support two cases.

@alan-null
Copy link
Owner

Fix will be available in the next version.

@MidasVE
Copy link
Author

MidasVE commented Oct 15, 2020

Hi @alan-null
Thank you! That works 👍

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

No branches or pull requests

2 participants