Comments (33)
Still no change unfortunately. Here's my testing routine again, just in case I should change anything:
- Clear Cache in Manager and Logout
- Clear Browser Cache and delete core/cache folder
- Login and select Articles Container resource
- Select and open any Article by using the "Edit" Button
- Immediately click the "Close" button to check for alert
- Click "Save" and then "Close" button to check for alert
- Make a change in the Articles content, click "Save" and then "Close" button to check for alert
from articles.
Yes, sorry, I do get the warning, after 1.7.12 installed in place of 1.7.11, adding the || typeof this.getFieldValue() === 'undefined'
condition per ab1f866, rm -rf core/cache
, logout all users, clear browser cache, open JavaScript Console, go to edit a NewsArticle, choose close, same old incorrect warning box as always.
from articles.
Question: why does the Articles addon check fp.warnUnsavedChanges
(see here) whereas this piece of MODX manager code checks fp.isDirty()
?
from articles.
Success! For me, 1.7.12 + ab1f866 + 0761f79 have corrected the unwanted warning messages for nonexistent unsaved changes on Chrome Version 75.0.3770.100 (Official Build) (64-bit) on Mac.
My changes to check fp.isDirty()
instead of fp.warnUnsavedChanges
do not seem to be needed also, so I've backed them out of my setup. But this discrepancy between MODX manager code fragment and the Articles addon is still disconcerting.
from articles.
I don't believe this is the same issue but most likely related to #68 and state of dirty/changed fields.
from articles.
Still present in latest 1.7.8 under MODX Revo 2.2.14
from articles.
Five years later... still showing this message, although latest changelog claims that it's fixed (it's NOT):
Articles 1.7.12
- Warn users about unsaved changes only if there are actual unsaved changes
from articles.
@VibeDesign, does it help if you clear the cache of your browser?
If not, please let me know what browser you are running.
from articles.
@JoshuaLuckers I deleted the browser cache, MODX cache via the manager and manual wiped core/cache, unfortunately still the same issue on latest Firefox Quantum 67.0.4 (64-Bit) and also Chrome Version 75.0.3770.100 (Offizieller Build) (64-Bit)
from articles.
Thanks for reporting back. What version of MODX are you running? Does it happen for other resources or only when editing Articles?
I want to get to the bottom of this issue and make sure to fix it for everyone!
from articles.
@JoshuaLuckers Thanks for your work! Really appreciate someone to work on this extra!
I'm running MODX 2.7.1-pl and I only face this issue with Articles resources (the resources within the Articles container resource to be exact).
from articles.
I'm able to reproduce this in Chrome, it works fine in Safari.
from articles.
@VibeDesign would you like to test if this change (0761f79) works for you?
from articles.
@JoshuaLuckers This doesn't work unfortunately. I made the change, cleared browser and MODX cache, but still the prompt shows up, after articles resource was already saved.
from articles.
Did you notice any improvement? What did you do (step by step) to trigger the alert?
from articles.
Seemed all the same like before.
- Opened the Articles container resource via the resource tree
- Selected an(y) article by clicking on the "edit" button
- Made a change in the articles content
- Hit Save Button
- Hit Close Button or select any other resource
- Alert pops up.
from articles.
I didn’t test that use case, thanks. My change fixes the unnecessary warning when the article is not edited and saved (same steps as provided by you except 3 & 4).
from articles.
Hitting save without changing the content still triggered the alert for me.
from articles.
I'll continue working on this upcoming weekend.
from articles.
from articles.
I don't have Notify installed.
from articles.
When saving an Article it’s being marked as dirty. I haven’t figured out yet why this happens.
from articles.
@VibeDesign would you like to test another change? (ab1f866)
from articles.
What happens if you add console.log(this.getFieldValue())
before line 71 in assets/components/articles/js/extras/tagfield.js
? I’m curious what it logs in step 7.
from articles.
What happens if you add console.log(this.getFieldValue()) before line 71 in assets/components/articles/js/extras/tagfield.js? I’m curious what it logs in step 7.
I am running 1.7.12, client is Chrome, I add this line and it prints undefined
in the console. I added this line to 1.7.11 and it also prints undefined
in the console. So either the field value is the string undefined
, or the dirty flagging isn't in this area? Chrome Version 75.0.3770.100 (Official Build) (64-bit) on Mac.
from articles.
@watou thanks, do you get the warning as well after applying this change? ab1f866
from articles.
Does it help if you change it to fp.isDirty()
(together with the other changes)?
from articles.
The only difference it appears to make is that one warning box is presented instead of another one. When fp.warnUnsavedChanges
is tested, you get the box that contains "Warning!
You have changes pending; are you sure you want to cancel? Yes No". When the code instead tests for fp.isDirty()
, you instead get the Chrome-provided box that has the Chrome logo, asks "Leave Site? The changes that you made may not be saved. Cancel Leave"
If I actually change the text of the article, I will get the warning box that indicates that isDirty() is returning true.
So could this mean that fp.isDirty()
is false when it should be, but something Chrome-specific is triggering a browser-level dirty flag out of view of Ext.js (if that makes sense)?
from articles.
Just a quick note: make sure to also apply this change: 0761f79
from articles.
Indeed that works! I probably reverted the first change, so it wasn't working. Now I don't get any false alerts!
I notice though, that I get a Firefox prompt now, wheter I want to save a login with the username "No" and a what seems randomly generated password. Not sure if this is related, but I haven't seen this before and also didn't change anything else on the site recently.
from articles.
@VibeDesign For me, 1.7.12 + ab1f866 + 0761f79 do not cause a strange save login save message on Firefox 68.0 for Mac.
from articles.
Thanks @watou and @VibeDesign for the great help!
My changes to check
fp.isDirty()
instead offp.warnUnsavedChanges
do not seem to be needed also, so I've backed them out of my setup. But this discrepancy between MODX manager code fragment and the Articles addon is still disconcerting.
I'll switch it back to fp.isDirty()
. I noticed warnUnsavedChanges
being set to true/false at various places and came across this line of code (changing it did solve the issue for me in the first place) :
window.onbeforeunload = function() {
if (panel.warnUnsavedChanges) return _('unsaved_changes');
};
from articles.
Thanks again for all the help. I'm officially marking this issue as fixed!
from articles.
Related Issues (20)
- URI bug with empty container_suffix
- Undefined index: debugUser in
- Update processor not found HOT 1
- 404 popup when going to Manage Articles HOT 1
- "Import Articles" ignores "Articles URL Format"
- "New Article"-Button not working, but Edit-Button does? HOT 3
- Update Articles plugin. Make Author and Tag page SEO friendly. HOT 4
- (Help Needed) My repository HOT 2
- getContent() crashes when called on an Article HOT 4
- Add "Published by" dropdown on article edition page HOT 8
- ArticlesPlugin OnPageNotFound can lead to resource exhaustion HOT 1
- Articles alias field is limited to 100 characters: The maximum length for this field is 100 HOT 3
- Updates are not available through modx.com provider HOT 1
- will there be a version for modx 3? HOT 38
- Pages Limit in the Pagination tab is not working HOT 3
- Articles Extra Fails to Update HOT 25
- Display issue HOT 8
- Articles cannot find Quip 2.3.5 on install HOT 7
- Close button not working on articles HOT 1
- Error with charset utf8mb4 in GetList (Articles Overview)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from articles.