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

Template discover install does not load language files #6835

Merged
merged 1 commit into from
Apr 25, 2015

Conversation

mahagr
Copy link
Contributor

@mahagr mahagr commented Apr 24, 2015

When using discover install, path to the template is wrong when loading the language.

Old code pointed to site/templates/{$template} or ADMINISTRATOR/templates/{$template} where it should point to the real directory, either in administration or site.

This pull request will fix the lookup path to point to {$base}/templates/{$template} where base is either JPATH_SITE or JPATH_ADMINISTRATOR.

@mahagr
Copy link
Contributor Author

mahagr commented Apr 24, 2015

To test this:

  • Copy beez3 to beez3.bak
  • Uninstall beez3 from Extension manager
  • Move beez3.bak to beez3
  • Make sure beez3 directory is writable by web server
  • Discover and install beez3

Before applying the patch, you will see this message:

TPL_BEEZ3_XML_DESCRIPTION

After the patch:

Accessible template for Joomla! Beez, the HTML 4 version.

PS. You can repeat the same with admin template.

@mahagr
Copy link
Contributor Author

mahagr commented Apr 24, 2015

See also: gantry/gantry5#114

@kat05
Copy link

kat05 commented Apr 24, 2015

this patch works for me, no more missing language strings on discover installations

@MATsxm
Copy link

MATsxm commented Apr 24, 2015

@test

Able to reproduce then #6835 works as expected both for admin & site templates.

Thanks


This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/6835.

@Bakual
Copy link
Contributor

Bakual commented Apr 24, 2015

@mbabker Can you review? I guess you know the code since you rewrote part of it recently 😄

@phproberto
Copy link
Contributor

@test ok

After applying the patch I tested:

  • Install admin template from folder
  • Install admin template with discover
  • Install admin template from zip
  • Install site template from folder
  • Install site template with discover
  • Install site template from zip

About the discover issue fixed here this was the $source value before applying the patch:

site/templates/mytemplate (wrong)

And the $source value after applying the patch:

/home/roberto/www/jcms3x/templates/mytemplate (right)

I also tested the the $source value was ok for all my install tests.

So 👍 here

@mahagr
Copy link
Contributor Author

mahagr commented Apr 25, 2015

Well, like I said in the pull request comment, the source was wrong also for admin: ADMINISTRATOR/templates/mytemplate.

Fixing $source was the only real change in the patch; rest of it was just reusing the same variable.

@mbabker
Copy link
Contributor

mbabker commented Apr 25, 2015

Good to go, consistent with other adapters that have multi-client support.

mbabker added a commit that referenced this pull request Apr 25, 2015
Template discover install does not load language files
@mbabker mbabker merged commit b21d7ee into joomla:staging Apr 25, 2015
@mahagr mahagr deleted the template-discover-bug branch April 27, 2015 07:08
@mahagr
Copy link
Contributor Author

mahagr commented Apr 27, 2015

Thanks, will now look at my next small improvement for the installer.

@mahagr
Copy link
Contributor Author

mahagr commented Apr 27, 2015

FYI for those who are interested on installer bugs: #6854

@zero-24 zero-24 added this to the Joomla! 3.4.2 milestone Apr 29, 2015
@zero-24 zero-24 added the RTC This Pull Request is Ready To Commit label Apr 29, 2015
@zero-24 zero-24 removed the RTC This Pull Request is Ready To Commit label Oct 14, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

8 participants