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

A page save randomly doesn't show save message. #1490

Closed
somatonic opened this issue Nov 5, 2015 · 12 comments
Closed

A page save randomly doesn't show save message. #1490

somatonic opened this issue Nov 5, 2015 · 12 comments

Comments

@somatonic
Copy link

I'm not sure what it's all about. Here's that.

I have locally a blank testinstall 2.6.18. I noticed this since some time that when I save a page in page editor backend, sometimes it doesn't show the green message on top that the page is saved. Just skips it. This happens only randomly.

I updated now to latest and still same happens.

To reproduce you just open about page and change title "aasdad" hit save. Just change title or also leave it same and hit save until it happens. Sometimes it doesn't happen for 5-6 saved, but suddenly...

@matjazpotocnik
Copy link

I tried very hard (in Chrome and IE), saved at least 100 times and couldn't reproduce on 2.6.21

@somatonic
Copy link
Author

Could this be something locally? I have no idea why this would happen randomly. Sorry, looks like I'm joking but it's definately not, it just happend two times in 20 saves. Chrome Mac with MampPro install. PHP 5.4.13.

@somatonic
Copy link
Author

Then again I can hit save 50 times and it works. Then suddenly. If there's nobody else observing this just ignore. I'll try again on other installs.

@adrianbj
Copy link

adrianbj commented Nov 5, 2015

I actually have a similar issue with my EmailNewUser module - when you create a new user it is supposed to generate a few messages letting you know their details and that they were successfully emailed their invite, but every now and then, the messages aren't displayed, even though everything actually worked as it was meant to.

I assume your observations are related to what I am seeing?

@somatonic
Copy link
Author

Totally yes. In my memory I noticed this even on older 2.4 installs, and those are not locally. Just randomly not showing save messages.

@somatonic
Copy link
Author

I just hit save without changing anything. So it would be session related I'd guess. Like It's choking or something.

@LostKobrakai
Copy link

Do you have SystemNotifications installed? I've noticed this several times when debugging hooks to the save process, but only with the module installed.

Edit: But it's happening even with the system notifications settings enabled to leave notifications alone.

@somatonic
Copy link
Author

No I don't have SystemNotificatons installed. Not stable enough :)

ryancramerdesign added a commit that referenced this issue Nov 6, 2015
@ryancramerdesign
Copy link
Owner

I'm aware of the issue in SystemNotifications occurring occasionally and have not been successful in figuring out why... yet. Though that's the only thing that's "not stable enough" in SystemNotifications that I'm aware of. But just reading that the issue occurred for you, even without SystemNotifications installed, made me look at the issue entirely differently–something clicked.

The notices (whether in SystemNotifications or without it) must be getting removed by some other AJAX request. This would make sense, since the queued notices get removed from the session, and populated to $notices when the session starts. Then if a redirect occurs, it re-queues them. But what if some AJAX request came in and just ended with a die() or exit(). Those notices wouldn't get re-queued and would essentially be lost. I think that's what's happening.

Given that, I've just pushed a potential fix for this which doesn't remove the notices from the $session until the admin.php template is included, and we know they've been output. While I've not been able to duplicate the issue without SystemNotifications, I can now see how it could occur. My hope is that this fix might resolve the issue both with and without SystemNotifications. Please let me know.

@craigrodway
Copy link

I haven't noticed/experienced the main issue reported here, but just a gotcha/FYI for when using notices in front-end template code.

On a site under development (2.6.23) I was wondering why, on subsequent pages, I kept seeing a notice I had previously removed. As this change takes away the automatic removal of notices from the session, I have to call $session->removeNotices(); manually to clear them.

Not sure if this was/should be intentional; or if this fix should/can be applied admin-side only?

@isellsoap
Copy link
Collaborator

@somatonic Could you please close this issue? Thank you!

@lparikka
Copy link

lparikka commented Apr 6, 2016

What do you say about @craigrodway comment above? Shouldn't the notices be cleared on page reload as they have been cleared before? Or do we need to call $session->removeNotices() every time?

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

8 participants