The Joomla! Forum ™



Forum rules


Please use the official Bug Tracker to report a bug: http://joomlacode.org/gf/project/joomla ... er_id=8103



Post new topic Reply to topic  [ 16 posts ] 
Author Message
PostPosted: Mon Apr 02, 2012 6:19 pm 
User avatar
Joomla! Apprentice
Joomla! Apprentice

Joined: Fri Jul 10, 2009 3:41 pm
Posts: 5
Location: Loves Park, IL
On line 543 of /libraries/joomla/installer/adapters/template.php there is a call
to the $lang object, but that object doesn't exist. Within the
discover_install() function, there is no call to $lang =
JFactory::getLanguage(). This causes the template install via Discover to fail.
The template partially intalls, but no Style is created, so you can't actually
use the template.

View tracker here - http://joomlacode.org/gf/project/joomla/tracker/?action=TrackerItemEdit&tracker_item_id=28345

_________________
Web Developer @ [url]electriceasel.com[/url]


Top
 Profile  
 
PostPosted: Mon Apr 02, 2012 6:43 pm 
User avatar
Joomla! Apprentice
Joomla! Apprentice

Joined: Fri Jul 10, 2009 3:41 pm
Posts: 5
Location: Loves Park, IL
Also, added a pull request on github - https://github.com/joomla/joomla-cms/pull/174

_________________
Web Developer @ [url]electriceasel.com[/url]


Top
 Profile  
 
PostPosted: Tue Apr 03, 2012 6:48 am 
User avatar
Joomla! Master
Joomla! Master

Joined: Fri Aug 12, 2005 3:47 pm
Posts: 16630
Location: **Translation Matters**
Thanks.
I moved the tracker to RTC

Replace
Quote:
/libraries/joomla/installer/adapters/template.php

by the attached file, after decompressing
Attachment:
template.php.zip


You do not have the required permissions to view the files attached to this post.

_________________
Jean-Marie Simonet / infograf · http://www.info-graf.fr
Multilanguage in 2.5: http://help.joomla.org/files/EN-GB_multilang_tutorial.pdf
---------------------------------
Joomla Translation Coordination Team • Joomla! Production Working Group


Top
 Profile  
 
PostPosted: Tue Apr 10, 2012 3:02 pm 
Joomla! Fledgling
Joomla! Fledgling

Joined: Tue Apr 10, 2012 2:33 pm
Posts: 2
Hi folks. Just ran into this problem. Have tried updating template.php with infograf768's replacement (I see he's added the fix dilbert4life suggested on the joomlatracker post) and that doesn't seem to work, either. With this new version, I just get a blank screen when I hit the "Discover" icon in the discover section. It doesn't even find my template to add it in.

Unfortunately, I don't understand the "style" of PHP that Joomla is written in (I'm guessing OOP) so I can't offer anything more constructive.

Please forgive my stupidity, but how else can I add a template in? This discovery option is the only way I've managed to get it to work so far.

Many thanks


Top
 Profile  
 
PostPosted: Tue Apr 10, 2012 3:23 pm 
User avatar
Joomla! Master
Joomla! Master

Joined: Fri Aug 12, 2005 3:47 pm
Posts: 16630
Location: **Translation Matters**
Your template should be installable through Extension Manager=>Install.
The discover funtion is useful when an extension is too large.

The patch is now committed to trunk.

_________________
Jean-Marie Simonet / infograf · http://www.info-graf.fr
Multilanguage in 2.5: http://help.joomla.org/files/EN-GB_multilang_tutorial.pdf
---------------------------------
Joomla Translation Coordination Team • Joomla! Production Working Group


Top
 Profile  
 
PostPosted: Tue Apr 10, 2012 3:37 pm 
User avatar
Joomla! Apprentice
Joomla! Apprentice

Joined: Fri Jul 10, 2009 3:41 pm
Posts: 5
Location: Loves Park, IL
Cool that they committed it to trunk - I've been dev'ing with Joomla! for the past 5 years, but this is the first core contribution I've made. I'll continue to submit things as I find them.

_________________
Web Developer @ [url]electriceasel.com[/url]


Top
 Profile  
 
PostPosted: Tue Apr 10, 2012 3:50 pm 
Joomla! Fledgling
Joomla! Fledgling

Joined: Tue Apr 10, 2012 2:33 pm
Posts: 2
Have managed to "upload" the template (it's only an intranet site, so I've got full access to the server) to the /tmp folder and hoover it in from there.

Many thanks for your help.


Top
 Profile  
 
PostPosted: Sat Apr 21, 2012 9:26 am 
Joomla! Apprentice
Joomla! Apprentice

Joined: Thu May 10, 2007 9:54 am
Posts: 16
Thank you for the fix. I was finally able to get my template installed using the Discover method after making the change to the template.php file.

However I wanted to say that this was the ONLY way I was able to install my template, which was a heavily modified template based on the beez5 template. I was not able to install in the Extensions Manager>Install section.

When I tried to upload with Browse, I got the messages "Unable to write entry" and "Unable to find install package".

When I tried to upload via the Directory, I got the message "Please enter a package directory".

When I tried to upload via URL, I got the message "Unable to write entry".

If anyone can tell me why I might be having such problems, I would greatly appreciate it.


Top
 Profile  
 
PostPosted: Sat Apr 21, 2012 9:52 am 
User avatar
Joomla! Master
Joomla! Master

Joined: Fri Aug 12, 2005 3:47 pm
Posts: 16630
Location: **Translation Matters**
zippity wrote:
Thank you for the fix. I was finally able to get my template installed using the Discover method after making the change to the template.php file.

However I wanted to say that this was the ONLY way I was able to install my template, which was a heavily modified template based on the beez5 template. I was not able to install in the Extensions Manager>Install section.

When I tried to upload with Browse, I got the messages "Unable to write entry" and "Unable to find install package".

When I tried to upload via the Directory, I got the message "Please enter a package directory".

When I tried to upload via URL, I got the message "Unable to write entry".

If anyone can tell me why I might be having such problems, I would greatly appreciate it.

Post here a zip of your template, as it is hard to help without testing it.

_________________
Jean-Marie Simonet / infograf · http://www.info-graf.fr
Multilanguage in 2.5: http://help.joomla.org/files/EN-GB_multilang_tutorial.pdf
---------------------------------
Joomla Translation Coordination Team • Joomla! Production Working Group


Top
 Profile  
 
PostPosted: Tue Apr 24, 2012 12:41 pm 
Joomla! Apprentice
Joomla! Apprentice

Joined: Tue Jan 23, 2007 8:56 pm
Posts: 47
infograf768 wrote:
Your template should be installable through Extension Manager=>Install.
The discover funtion is useful when an extension is too large.

I thought - but please correct me if I'm wrong - that 'Discover' was also really useful if you want to make a copy of an existing template (or other things I guess) as a starting point for modifications.

Since core templates are prone to getting modified in upgrades I always start by making a copy of whichever template I am going to use as a starting point and discovering that so as to have my own version to mess with.

There may even be a utility to automate this - as a minimum it just involves copying all the files to a newname folder in templates and changing the name to newname in three places in the xml file, renaming the two langauge files to newname and copying them to the language folder. Then discover should automatically find and 'install' the newname template - a really useful new feature over 1.5

There is a duplicate template style option provided in the backend - it would be really useful if there was also a duplicate template option which did this.

RogerCO


Top
 Profile  
 
PostPosted: Wed May 09, 2012 6:04 am 
User avatar
Joomla! Master
Joomla! Master

Joined: Fri Aug 12, 2005 3:47 pm
Posts: 16630
Location: **Translation Matters**
See this new proposed feature, test and comment:

http://joomlacode.org/gf/project/joomla ... m_id=28472

_________________
Jean-Marie Simonet / infograf · http://www.info-graf.fr
Multilanguage in 2.5: http://help.joomla.org/files/EN-GB_multilang_tutorial.pdf
---------------------------------
Joomla Translation Coordination Team • Joomla! Production Working Group


Top
 Profile  
 
PostPosted: Wed May 09, 2012 8:03 pm 
Joomla! Apprentice
Joomla! Apprentice

Joined: Tue Jan 23, 2007 8:56 pm
Posts: 47
That looks ideal from the description and I'd be happy to test it and report back but there only seems to be a ".patch" file to download and when I look at it with a text editor it appears to be some replacement or additional bits for various files but every line is preceded with a '+' character so you can't simply copy and paste it into the existing files to test it. Is there any way of adding the contents of a .patch file to an existing installation?

I did try searching on the Joomlacode and the Developer site but came up with no simple explanation.

Sorry for the naive beginner's question but if I can't test it then I guess I'll have to wait until the great and the good pronounce it fine and include it in a future release. Perhaps I'd better go and google 'patch file format' in case it is some widely used common thing that I've simply not come across before and you are all laughing at my ignorance...


Top
 Profile  
 
PostPosted: Thu May 10, 2012 8:50 am 
User avatar
Joomla! Master
Joomla! Master

Joined: Fri Aug 12, 2005 3:47 pm
Posts: 16630
Location: **Translation Matters**
To use a patch, one needs a SVN or git client.

_________________
Jean-Marie Simonet / infograf · http://www.info-graf.fr
Multilanguage in 2.5: http://help.joomla.org/files/EN-GB_multilang_tutorial.pdf
---------------------------------
Joomla Translation Coordination Team • Joomla! Production Working Group


Top
 Profile  
 
PostPosted: Thu May 10, 2012 10:13 am 
Joomla! Apprentice
Joomla! Apprentice

Joined: Tue Jan 23, 2007 8:56 pm
Posts: 47
ah thanks. I use SVN at work but have never come across patch files before (they probably get hidden by the IDE), and can't do home stuff at work so will have to wait till it gets released. (for a single developer I find SVN more hassle than its worth for small projects outside paid work - but then I still use a plain text editor for PHP so I guess I'm a bit old fashioned)

Many thanks for getting this improvement into the core development.


Top
 Profile  
 
PostPosted: Fri May 11, 2012 11:01 am 
Joomla! Fledgling
Joomla! Fledgling

Joined: Tue Nov 08, 2011 1:37 pm
Posts: 1
May I ask why the debugging state of the Language class have to be changed?
The Language class is not used at all in the discover_install() method.
I think the developer just wanted to change the debugging state of the Database class?

But the template will be installed correctly when you remove the following lines of the discover_install() method;
Code:
$debug = $lang->setDebug(false);
and
Code:
$lang->setDebug($debug);


Top
 Profile  
 
PostPosted: Fri May 11, 2012 12:48 pm 
User avatar
Joomla! Master
Joomla! Master

Joined: Fri Aug 12, 2005 3:47 pm
Posts: 16630
Location: **Translation Matters**
@Wyrix

This code is there when someone discovers a template while in debug lang mode.
In this case the default name of the template is saved with **nameoftemplate**

Issue now solved by patch.

_________________
Jean-Marie Simonet / infograf · http://www.info-graf.fr
Multilanguage in 2.5: http://help.joomla.org/files/EN-GB_multilang_tutorial.pdf
---------------------------------
Joomla Translation Coordination Team • Joomla! Production Working Group


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 16 posts ] 



Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  
Powered by phpBB® Forum Software © phpBB Group