Bootstrap in joomla 2.5 extensions

2,862 views
Skip to first unread message

mataal

unread,
Nov 8, 2012, 7:06:40 AM11/8/12
to gantry-framework...@googlegroups.com
If an extension is using bootstrap in joomla 2.5, the latest gantry breaks with:

JHtml: :bootstrap not supported. File not found.

Notice: Undefined variable: gantry in /Applications/MAMP/htdocs/j25/templates/rt_graffito/error.php on line 19

Fatal error: Call to a member function init() on a non-object in /Applications/MAMP/htdocs/j25/templates/rt_graffito/error.php on line 19

mataal

unread,
Nov 11, 2012, 12:44:55 PM11/11/12
to gantry-framework...@googlegroups.com
Edit the Gantry file: 
/plugins/system/gantry/gantry.php in line 162, where you will find:

if ($this->_contains($buffer, $this->bootstrapTriggers)) {
	JHtml::_('bootstrap.framework');
}

Change it to:

if ($this->_contains($buffer, $this->bootstrapTriggers)) {
	$jversion = new JVersion;
	$current_version = $jversion->getShortVersion();
	if (version_compare($current_version, '3.0.0') >= 0)
	{
		JHtml::_('bootstrap.framework');
	}
}

Chris Clay

unread,
Nov 21, 2012, 8:17:18 PM11/21/12
to gantry-framework...@googlegroups.com
Thank you so much for posting this solution! I just upgrade to Gantry 4.1.3 and my site crashed... I found the solution below (editing gantry/gantry.php) and my site's back :)

Chris
Message has been deleted

Maria Maria

unread,
Nov 22, 2012, 1:23:16 AM11/22/12
to gantry-framework...@googlegroups.com
Join us, have the same problem

Andy Miller

unread,
Nov 22, 2012, 1:52:44 AM11/22/12
to gantry-framework...@googlegroups.com
What version of Joomla are you guys running when this error occurs??

Sami Haaranen

unread,
Nov 22, 2012, 8:50:55 AM11/22/12
to gantry-framework...@googlegroups.com
We get this error too in J! 2.5.8...

Rich McComas

unread,
Nov 22, 2012, 9:02:33 AM11/22/12
to gantry-framework...@googlegroups.com
My ver 4.1.3 of gantry.php from rockettheme does not have the lines you described.  Instead, I have the following at line 268:


            if (empty($buffer) && !count($messages)) return;

            // wether to load bootstrap jui or not
            if ($this->_contains($buffer, $this->bootstrapTriggers) || count($messages)) {
                JHtml::_('bootstrap.framework');
            }

I am running Joomla 2.5.7.  Does anyone know how I should modify this?

Sami Haaranen

unread,
Nov 22, 2012, 9:07:24 AM11/22/12
to gantry-framework...@googlegroups.com
I have those kind lines too
Message has been deleted

Momchil Petrushkov

unread,
Nov 22, 2012, 9:19:49 AM11/22/12
to gantry-framework...@googlegroups.com
Guys! Just fixed it! All you need to do is to downgrade from here: http://code.google.com/p/gantry-framework/downloads/list?can=1&q=platform%3Djoomla25&colspec=Filename+Summary+Uploaded+Size+DownloadCount+Type+Platform 

Just install the zip file like a normal module and it will do the magic! 

I hope this helps! 

Cheers

Rich McComas

unread,
Nov 22, 2012, 9:20:23 AM11/22/12
to gantry-framework...@googlegroups.com
I changed line 268-271 to this and it solved the problem:

            // wether to load bootstrap jui or not
            if ($this->_contains($buffer, $this->bootstrapTriggers) || count($messages)) {
                $jversion = new JVersion;
                $current_version = $jversion->getShortVersion();
                if (version_compare($current_version, '3.0.0') >= 0)
                {
                    JHtml::_('bootstrap.framework');
                }
            }

Andy Miller

unread,
Nov 22, 2012, 10:34:00 AM11/22/12
to gantry-framework...@googlegroups.com
This is specifically related to extensions in 2.5 that are using bootstrap on their own. Fix for now is to either use the fix provided by Mataal or to downgrade to the previous version that was working for you:

http://code.google.com/p/gantry-framewo ... e+Platform

Just download and install the appropriate framework zip file via the Joomla installer. We'll be looking at this tomorrow as the office is closed today due to Thanksgiving holiday.


On Wednesday, November 21, 2012 11:23:16 PM UTC-7, Maria Maria wrote:

mataal

unread,
Nov 22, 2012, 11:41:15 AM11/22/12
to gantry-framework...@googlegroups.com
Great that it helped others :)

Din Muhammad Sumon

unread,
Nov 23, 2012, 10:45:01 AM11/23/12
to gantry-framework...@googlegroups.com
Thanks for giving this amazing solutions.
Reply all
Reply to author
Forward
0 new messages