Giter Site home page Giter Site logo

Comments (10)

benjamminf avatar benjamminf commented on August 19, 2024

Stupid question but are you running at least version 1.3.1 or greater? I actually fixed this issue in 1.3.1 and can't seem to reproduce this in later versions. Otherwise, can you tell me what the specs are of your environment? (Browser as well as Craft & PHP version) Thanks

from craft-neo.

ianshea avatar ianshea commented on August 19, 2024

No prob! I'm running Neo 1.3.3. Running Craft CMS 2.6.2903, PHP 5.6.10.

Chrome Version 52.0.2743.116 (64-bit)
Safari Version 9.1.2 (11601.7.7)

I'm on my local box using Mamp. So I did a quick switch to PHP 7.0.8 and I still see the issue.

However, I'm not seeing the issue in Firefox 45.0.1 or 48.0. So this is most likely a webkit thing... I'll see if I can debug a bit more on this.

from craft-neo.

ianshea avatar ianshea commented on August 19, 2024

Okay, little more info. I've got a bunch of Rich Text redactor fields in my setup, and removing any blocks containing those fields seems to alleviate this particular issue. So I think this may be related to #44

from craft-neo.

benjamminf avatar benjamminf commented on August 19, 2024

Unfortunately I'm still unable to reproduce this issue. I've tried on the same version of Chrome on both Windows and OSX, and with a variety of different rich text fields, and I can't get it to trip up. I have released a new version (1.3.4) which has made changes to the way resources are loaded for blocks, so it's possible this could solve the issue, but I doubt it. Nevertheless, give it a try and let me know how it goes.

from craft-neo.

AbbeyDesign avatar AbbeyDesign commented on August 19, 2024

Just posted on Slack... should've checked here first. I have the latest version 1.3.4 and I get it on Chrome. Not Firefox or Safari, just Chrome. I had this happen once on another site, but it eventually went away. In both cases I suspect it started when I added a dropdown field(after weeks without issue), then changed the options in the dropdown field(including the default value). Ended up removing the field(dropdown) from Neo completely, no change.

on MAMP with php7 all browsers and craft most recent versions.

from craft-neo.

AbbeyDesign avatar AbbeyDesign commented on August 19, 2024

Just to clarify, I also had RichText fields in my NEO, but the issue only popped up once I added and started messing around with a dropdown.

from craft-neo.

fyrebase avatar fyrebase commented on August 19, 2024

I can confirm Neo 1.3.4 and Chrome 52.0.2743.116 prompts when leaving and a dropdown / select is present. I can give you a DB dump if it helps @benjamminf

from craft-neo.

benjamminf avatar benjamminf commented on August 19, 2024

This is so bizzare. I've figured out what's causing it and it's so stupid.

Turns out it has something to only do with Redactor 1 & 2 (I've tried other rich text editors like Froala and it doesn't do this). It happens only when you have multiple paragraphs of content in a Redactor field, and even then it only happens in some situations (which I haven't quite pinpointed yet...)

This is such a weird bug, and I'm honestly at a loss as to how and why this is happening. My best guess is that after Redactor is initialised, and after Craft has taken a snapshot of the values on the page, it's changing the value of the field in some subtle way. Like, maybe it's trimming some white-space or something. I dunno, I guess this is just another reason for Craft to finally ditch Redactor.

Anyway, at least I've been able to replicate it.

from craft-neo.

ianshea avatar ianshea commented on August 19, 2024

@benjamminf Can you point out in the codebase on where it may be happening/conflicting with Redactor? I might be able to fit in some troubleshooting this week to help out.

Small edit, cause I realize if you knew where, you'd have it fixed. Duh.

from craft-neo.

benjamminf avatar benjamminf commented on August 19, 2024

@ianshea thanks for the offer, but I've figured it out. My guess was correct - Redactor is filtering out white-space which is playing with the modification detection script. Neo actually has it's own modification detection, which is used to bypass saving individual blocks if they haven't changed. This was getting tricked, which caused it to change a hidden "modification flag" field, which in turn tricked Craft's own modification detection.

Aaaanyway, I just moved where Neo takes it's snapshot to after this white-space removal, and now it's all working 👍

from craft-neo.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.