[Solved] Upgrade error from 1.6.x to 1.7.0 - Notice Message

Everything to do with Joomla! 2.5 templates and templating.

Moderator: General Support Moderators

Forum rules
Forum Rules
Absolute Beginner's Guide to Joomla! <-- please read before posting, this means YOU.
Forum Post Assistant - If you are serious about wanting help, you will use this tool to help you post.
Locked
User avatar
PhilOSparta
Joomla! Guru
Joomla! Guru
Posts: 532
Joined: Sun Feb 25, 2007 10:44 pm
Location: New Jersey, USA
Contact:

[Solved] Upgrade error from 1.6.x to 1.7.0 - Notice Message

Post by PhilOSparta » Sat Jul 16, 2011 8:47 pm

I'm using a modified version of Beez 20 which has been working fine on 1.6.x.
When I went to upgrade to 1.6.5, the system upgraded to 1.7.0.
I thought that was unusual, but now I have the word "Notice" on the start of every content page. All pages render correctly after the "Notice" line.

The source code generated in BEEZ 20 ver. 1.6.x is this:

Code: Select all

<div id="main">
	<div class="error">
	<h2>	Notice	</h2>
	<div id="system-message-container">
	</div>
	</div>
There's no explanation of the error.

EDIT: Solution
There has been a change in the BEEZ 20 template with the 1.7.0 version of Joomla.
The BEEZ 20 index.php file had this code in version 1.6.x

Code: Select all

<?php if ($this->getBuffer('message')) : ?>
       <div class="error">
        <h2>
        <?php echo JText::_('JNOTICE'); ?>
        </h2>
        <jdoc:include type="message" />
       </div>
  <?php endif; ?>

 <jdoc:include type="component" />
The BEEZ 20 index.php code has been changed in version 1.7.0 to this:

Code: Select all

<jdoc:include type="message" />
<jdoc:include type="component" />
Deleting all the lines in the 1.6.x version so that it only includes those of the 1.7.0 version fixed the problem.

I hope that saves some people some time.

Regards,

Phil





Phil

Hairs
Joomla! Intern
Joomla! Intern
Posts: 63
Joined: Tue Mar 08, 2011 7:57 am
Location: Australia
Contact:

Re: [Solved] Upgrade error from 1.6.x to 1.7.0 - Notice Mess

Post by Hairs » Thu Jul 21, 2011 1:23 am

Hi Phil,
I've had the same problem,
Cannot find code to delete. word "information" After upgrade
but with no luck trying your suggestions.
Cheers for posting up.

Jon
Never get too busy making a living

That you forget to make a life

User avatar
PhilOSparta
Joomla! Guru
Joomla! Guru
Posts: 532
Joined: Sun Feb 25, 2007 10:44 pm
Location: New Jersey, USA
Contact:

Re: [Solved] Upgrade error from 1.6.x to 1.7.0 - Notice Mess

Post by PhilOSparta » Thu Jul 21, 2011 2:04 am

I took a look at your source code when your page displays and you clearly have the code displayed that should be removed:

Code: Select all

					
	<div class="error">
		<h2>
			Information						</h2>
							
<div id="system-message-container">
</div>
							</div>
That's generated by the lines that should be removed.
I have to assume that you are using some version of the BEEZ 20 template. If not, you are using one that has been copied from the BEEZ 20. There are so many clones that are offered "Free" that you have to be careful of what you get.

This is the code extracted from your original post:

Code: Select all

<?php if ($this->getBuffer('message')) : ?>
<div class="error">
<h2>
<?php echo JText::_('TPL_GREEN-DAY_SYSTEM_MESSAGE'); ?>
</h2>
<jdoc:include type="message" />
</div>
<?php endif; ?>
I think I would just remove that block of code, or maybe leave the single line:
<jdoc:include type="message" />. I don't know what the message type is.

Maybe that will help.

Phil

Hairs
Joomla! Intern
Joomla! Intern
Posts: 63
Joined: Tue Mar 08, 2011 7:57 am
Location: Australia
Contact:

Re: [Solved] Upgrade error from 1.6.x to 1.7.0 - Notice Mess

Post by Hairs » Thu Jul 21, 2011 2:44 am

Thank you Phil,
I had forgotten I use a template Green day. I deleted the the code and all is good.
I appreciate your time.
Image

Jon
Never get too busy making a living

That you forget to make a life

chriscon
Joomla! Apprentice
Joomla! Apprentice
Posts: 6
Joined: Tue Mar 18, 2008 4:53 pm

Re: [Solved] Upgrade error from 1.6.x to 1.7.0 - Notice Mess

Post by chriscon » Wed Aug 10, 2011 1:07 pm

Thank you :)

User avatar
Peligro
Joomla! Enthusiast
Joomla! Enthusiast
Posts: 148
Joined: Thu Oct 26, 2006 12:34 pm
Location: Hordaland, Norway

Re: [Solved] Upgrade error from 1.6.x to 1.7.0 - Notice Mess

Post by Peligro » Sun Aug 21, 2011 11:42 pm

Thank you for the solution! :)
Mvh
Geir-K.

"Hvis du tror du er ferdig utlært, er du ikke utlært, men ferdig."

ap91
Joomla! Apprentice
Joomla! Apprentice
Posts: 7
Joined: Thu Jan 14, 2010 5:11 pm

Re: [Solved] Upgrade error from 1.6.x to 1.7.0 - Notice Mess

Post by ap91 » Sun Sep 11, 2011 6:58 pm

Thanks!

kathkeating
Joomla! Intern
Joomla! Intern
Posts: 52
Joined: Wed Feb 11, 2009 12:17 am
Location: Colorado
Contact:

Re: [Solved] Upgrade error from 1.6.x to 1.7.0 - Notice Mess

Post by kathkeating » Mon Sep 19, 2011 7:00 pm

I'm getting the following empty system_message_container and it's only on some pages of my site.

I've got the following showing up on my page:

Code: Select all

<div id="system-message-container"> </div>
Here's what my template looks like (it's like it's supposed to be with nothing wrapping it.

Code: Select all

<jdoc:include type="message" />
<jdoc:include type="component" />
Anyone have any bright ideas why this might be happening even when everything is set up properly. There's definitely no error being thrown, just this one page is "stuck" in this situation.

it's throwing my formatting off.
Kathy Keating
CTO, www.tricalyx.com

lackofskill
Joomla! Apprentice
Joomla! Apprentice
Posts: 6
Joined: Wed Jun 22, 2011 7:05 pm

Re: [Solved] Upgrade error from 1.6.x to 1.7.0 - Notice Mess

Post by lackofskill » Sun Oct 16, 2011 1:14 am

what my code looks like when removing the notice.

<?php /* <?php if ($this->getBuffer('message')) :
<div class="error">
<?php echo JText::_('JNO
</h2>
<jdoc:include type="message" />
</div>
<?php endif; ?>
*/ ?>
<jdoc:include type="message" />
<jdoc:include type="component" />

wypaq
Joomla! Intern
Joomla! Intern
Posts: 73
Joined: Mon Mar 19, 2012 2:17 pm

Re: [Solved] Upgrade error from 1.6.x to 1.7.0 - Notice Mess

Post by wypaq » Mon Mar 19, 2012 2:29 pm

Thank you for the solution.
I had the same problem with the template Desert-Orange from Joomlaxtreme when upgrading from 1.6 to 2.5. I removed the code completely and the problem disappeared. :D

The code was :
<?php if ($this->getBuffer('message')) : ?>
              <div class="error">
                <h2>
                  <?php echo JText::_('TPL_DESERT-ORANGE_SYSTEM_MESSAGE'); ?>
                </h2>
                <jdoc:include type="message" />
              </div>
            <?php endif; ?>

snookered
Joomla! Fledgling
Joomla! Fledgling
Posts: 1
Joined: Sat Mar 03, 2012 4:48 pm

Re: [Solved] Upgrade error from 1.6.x to 1.7.0 - Notice Mess

Post by snookered » Mon Mar 26, 2012 11:19 pm

Thank you thank you thank you so much for this fix. This error has been driving me crazy and I am almost in tears (exaggeration) now that it's been fixed!

mishi
Joomla! Apprentice
Joomla! Apprentice
Posts: 48
Joined: Tue Mar 09, 2010 2:14 pm

Re: [Solved] Upgrade error from 1.6.x to 1.7.0 - Notice Mess

Post by mishi » Tue Mar 27, 2012 2:26 pm

I think I have a related error and maybe you guys will know the fix...

I updated my site from 1.5 to 2.5 and converted my template over. Everything works fine, except my articles are not showing up. When I compare the code from both...the correct one has a ton of extra divs with a contentpane, etc where the article is. In the incorrect one, I simply have the system-message-container div and nothing else.

Any ideas how this could be related?

willdashwood1
Joomla! Fledgling
Joomla! Fledgling
Posts: 3
Joined: Mon Oct 31, 2011 6:56 am

Re: [Solved] Upgrade error from 1.6.x to 1.7.0 - Notice Mess

Post by willdashwood1 » Wed May 02, 2012 2:24 am

Awesome! Thanks

BdN3504
Joomla! Fledgling
Joomla! Fledgling
Posts: 4
Joined: Mon Sep 14, 2009 3:13 pm

Re: [Solved] Upgrade error from 1.6.x to 1.7.0 - Notice Mess

Post by BdN3504 » Sun Jul 15, 2012 7:18 pm

Messieurs,
I must disappoint you. The solution provided above is not fixing the issue. What is the issue? By looking at the code, the error seems to be that in previous versions the getBuffer method returned true when there was an error message, e.g. an invalid login attempt. If you choose to "solve" the problem by substitung the checks for this error with the following two lines
PhilOSparta wrote:

Code: Select all

<jdoc:include type="message" />
<jdoc:include type="component" />
your users will not receive an error message when they try to use an incorrect login. So you definitely should not do that. What you should do instead of substitung these lines is doing a little research on google. Let me explain my train of thought here: Error handling must have changed because if we look at the output of the following line

Code: Select all

var_dump($this->getBuffer('message')
we'll find out, that this string is never empty. In fact, it contains the html code for the peculiar empty div element that is added to all of our pages. In consequence, the condition checked for will never evaluate to true. By googling for that string though, we have found what we must check against:

Code: Select all

JFactory::getApplication()->getMessageQueue()
Using this code portion, you can re-introduce the check of the previous template version to avoid adding unnecessary markup to your page. Use some code similar to this one:

Code: Select all

<?php if(JFactory::getApplication()->getMessageQueue()) : ?>
	<div class="error">
		<h2><?php echo JText::_('JNOTICE'); ?></h2>
		<jdoc:include type="message" />
	</div>
<?php endif; ?>
	<jdoc:include type="component" />
I will write an E-mail to Mrs. Radtke pointing to this entry, maybe she can incorporate this into her code again.

User avatar
boaz
Joomla! Apprentice
Joomla! Apprentice
Posts: 15
Joined: Mon Sep 26, 2005 7:31 am
Location: Australia

Re: [Solved] Upgrade error from 1.6.x to 1.7.0 - Notice Mess

Post by boaz » Sat Aug 18, 2012 8:10 am

For what it's worth I did this to fix the problem (after upgrading 1.6.6 to 1.7.3 produced "NOTICE" at the top of each content page):

Template Manager > Templates > beez_20 Details > Edit main page template

Scoll through approximately 70% of the file and find this code:

Code: Select all

<?php if ($this->getBuffer('message')) : ?>
                                                        <div class="error">
                                                                <h2>
                                                                        <?php echo JText::_('JNOTICE'); ?>
                                                                </h2>
                                                                <jdoc:include type="message" />
                                                        </div>
                                                <?php endif; ?>

                                                        <jdoc:include type="component" />
Then, rather than delete this code, I 'commented' it out:

Code: Select all

<!-- <?php if ($this->getBuffer('message')) : ?>
                                                        <div class="error">
                                                                <h2>
                                                                        <?php echo JText::_('JNOTICE'); ?>
                                                                </h2>
                                                                <jdoc:include type="message" />
                                                        </div>
                                                <?php endif; ?>

                                                        <jdoc:include type="component" />  -->
(Note the <!-- at the beginning and --> after the end.)
Then above I pasted this:

Code: Select all

<?php if(JFactory::getApplication()->getMessageQueue()) : ?>
   <div class="error">
      <h2><?php echo JText::_('JNOTICE'); ?></h2>
      <jdoc:include type="message" />
   </div>
<?php endif; ?>
   <jdoc:include type="component" />
Although I'm no coder this did stop the "NOTICE" from appearing...

I hope this helps :)
cheers.


Locked

Return to “Templates for Joomla! 2.5”