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

Ctrl-S saved entry with Categories alerts 'unsaved' #4397

Closed
narration-sd opened this issue Jun 12, 2019 · 7 comments
Closed

Ctrl-S saved entry with Categories alerts 'unsaved' #4397

narration-sd opened this issue Jun 12, 2019 · 7 comments

Comments

@narration-sd
Copy link
Contributor

Description

On leaving the entry page, I'm getting the unsaved alert. Full button Save is ok. This is an abso fresh Craft 3.1.30 site, installed on server via Composer. The few other entries without Categories act normally.

Steps to reproduce

  1. Make a Section with a Categories field
  2. Edit a first entry in it, filling in the Categories as desired
  3. Cntl-S save - normal response
  4. Try to leave the entry for any other place: get improper unsaved alert
  5. Button Save - leaves normally, no alert

Additional info

  • Craft version: 3.1.30 (Solo)
  • PHP version: 7.1.30
  • OS version: Linux 4.15.0-51-generic
  • Database driver & version: MySQL 5.5.5
  • Image driver & version: GD 7.1.30
  • Plugins & versions:
    • CraftQL 1.3.2
    • Element API 2.5.4
    • Redactor 2.3.3.2
@narration-sd narration-sd changed the title Ctrl-S saved entry with Categories alerts 'unsaved'.That's on leaving the page.This is an abso fresh Craft 3.1.30 site, installed on server via Composer. The few other entries without Categories act normally. Ctrl-S saved entry with Categories alerts 'unsaved' Jun 12, 2019
@narration-sd
Copy link
Contributor Author

narration-sd commented Jun 12, 2019

Extra credit: The reporting interface on Dashboard needs to not add more than the first sentence or N characters to the Github issue title. You can see the mess this made....

@brandonkelly
Copy link
Member

I’m not able to reproduce this. Suspect it’s another field at fault; maybe Redactor?

@narration-sd
Copy link
Contributor Author

Hmm. A fully fresh install, just title, body, cat fields, but I'll try to have a further look.

@narration-sd
Copy link
Contributor Author

narration-sd commented Jun 14, 2019

Hmm. This is a pretty weird one.

  • I still see it. And then I don't. It seemed solid on the session where reported, but I'm on the same site. I tried it just now, fail, a couple of times. Tried again multiple times, didn't happen.
  • remembering, the first time it didn't fail, I'd clicked a back link in the breadcrumbs out of edit, rather than selecting from the left-hand side menu. But neither brought the error back.
  • I do see this console'd error crop up from Redactor at times. Not in any sync with the reported problem, I am nearly certain. I'd cleared the console before non-failing tries.
  • In fact I'm actually pretty sure the error comes up at random times not to do with editing. Like Ajax on a timer is happening, and I know there can be some, though a while since looking seriously at Garnish, your JS wonder ;)
  • and then, the error is coming on a stack from onEditorBlur. So maybe it's triggered by mouse waving around, rather than timer....can't seem to excite it just now, though.
jquery.js:5481 Uncaught TypeError: r.shift is not a function
    at HTMLBodyElement.handler (jquery.js:5481)
    at HTMLBodyElement.dispatch (jquery.js:5233)
    at HTMLBodyElement.v.handle (jquery.js:5040)
    at Dom.<anonymous> (redactor.js:873)
    at Dom.each (redactor.js:245)
    at Dom.trigger (redactor.js:858)
    at s.constructor.onEditorBlur (RedactorInput.js:182)
    at s._loop (redactor.js:2842)
    at s.trigger (redactor.js:2812)
    at App.broadcast (redactor.js:2280)

@brandonkelly
Copy link
Member

Hm, not sure. If you can come up with steps to reproduce it reliably, maybe send in your composer.json and composer.lock files, plus a database dump and the steps to reproduce, to [email protected], and we can look into it from there.

@narration-sd
Copy link
Contributor Author

Right, and I woke up this morning mulling this for a moment, which brought the following insight:

  • there aren't any Redactor fields in the preview, if it's showing (memory is I found this without preview, also), because the preview's a React/Gatsby page.
  • So has to be CP-side
  • and...I have a big interruptive plugin in the browser/s, relating to the other vocation i'm sliding into, a writer's intelligent editor. Not at all unlikely that's fussing up a Redactor field.
  • side issue that this problem only shows on the remote staging server, because afaik it's running all the same composer'd versions as the dev workstation vm. So the difference is likely just timings.

I'll pull that plugin out and see if this ghost goes away, if so, will close issue.

Thanks for this attention, and don't give it more please, unless we find something really apropos. That plugin's squirrreling all over this as I write, reminding how engaged it is in watching everything in this plain textarea field, making underlines over words but also phrases in which it takes an interest....

@narration-sd
Copy link
Contributor Author

Oh, you did close - fine, and again, thanks. You know how it is in getting up a release ;)

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

No branches or pull requests

2 participants