Jump to content

Flash messages stays (problem after update to 2.7)


Sradesign
 Share

Recommended Posts

no I load my messages in frontend pages after login cause I have separate admin pages for myself and do some action in it like updating user details and etc before update everything with messages was great but now everything stay in browsers cache by the way my project is on wamp localhost.

Link to comment
Share on other sites

                                      <?php if($notices){ ?>
						<?php foreach($notices as $notice){
							if($notice instanceof NoticeMessage) {
								$class = 'success ';
								$text = $notice->text; 
								$icon = 'check';
							}

							if($notice instanceof NoticeError || $notice->flags & Notice::warning) {
								if($notice->flags & Notice::warning) {
									$class .= 'alert-warning';
									$icon = 'warning';
								} else {
									$class .= 'alert-danger';
									$icon = 'exclamation-triangle'; 
								}
							}

							if($notice->flags & Notice::debug) {
								$class .= 'danger';
								$icon = 'gear';
							}

							if(!$icon) $icon = 'fa fa-check';
						?>
							<div class="alert alert-<?php echo $class; ?> alert-dismissable">
								<button type="button" class="close" data-dismiss="alert" aria-label="Close"><span aria-hidden="true">×</span></button>
								<i class="fa fa-<?php echo $icon; ?>"></i> <?php echo $notice->text;?>
							</div>
						<?php } ?>
					<?php } ?>

This is my code for showing the messages and below is the code that I have in order to create them.

                foreach($files4 as $filename) {
			$user->doc4->removeAll();
			$user->doc4->add($upload_path . $filename);
			$user->message("Added file 4 : $filename");
			unlink($upload_path . $filename);
		}
		
		$user->save();
		$user->of(true);
		$session->message(__('Personal Information updated successfully'));
		$this->session->redirect($this->page->url);
Link to comment
Share on other sites

  On 11/16/2015 at 7:27 PM, kongondo said:

Any JS errors in the console?

No Js error at all

  On 11/16/2015 at 9:31 PM, WillyC said:

u cane do $session->removeNotices(); 

aftr u dipslay.notices

It doesn't work I tried that too.

  On 11/16/2015 at 11:27 PM, Craig A Rodway said:

WillyC is right. I noticed this too, and updated a relevant issue at GitHub.

Thanks I checked it and doesn't seems to work

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...