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

[plg_content_vote|pagebreak] Load language files only when needed #11730

Merged
merged 6 commits into from
Aug 25, 2016

Conversation

andrepereiradasilva
Copy link
Contributor

@andrepereiradasilva andrepereiradasilva commented Aug 22, 2016

Pull Request for Issue #11714 (part 2).

Summary of Changes

Only load the plg_content_pagebreak and plg_content_vote languages files when they are needed.
Example: don't load them if the show_vote is not active or there is no pagebreak class.

For more info see #11714

Testing Instructions

Reproduce

  • Use latest staging
  • Enable plugin content vote and plugin content pagebreak
  • Enable debug and debug lang in global config
  • Enable debug system plugin with all options activated
  • Go to frontend and check the debug console
  • Notice JROOT/administrator/language/en-GB/en-GB.plg_content_vote.ini and JROOT/administrator/language/en-GB/en-GB.plg_content_pagebreak.ini language file is loaded no matter what page you are (even in backend pages they are loaded).

image

Test patch

  • Apply patch
  • Repeat the steps above and checkthe two language files are NOT loaded (except when needed).
  • Check plugin work as before if language files are required to load (ex: show_vote enabled / article with pagebreak, etc).

Documentation Changes Required

None.

@andrepereiradasilva andrepereiradasilva changed the title [plg_content_vote|pagebreak] Load languague files only when needed [plg_content_vote|pagebreak] Load language files only when needed Aug 22, 2016
@andrepereiradasilva
Copy link
Contributor Author

@mbabker i updated this PR to follow the logic you added for modules in #11698, but this time for the plugins.

Can you check if all ok?

@mbabker
Copy link
Contributor

mbabker commented Aug 22, 2016

Looks fine.

@andrepereiradasilva
Copy link
Contributor Author

thanks

@alikon
Copy link
Contributor

alikon commented Aug 22, 2016

I have tested this item ✅ successfully on 3b028a3


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

1 similar comment
@jeckodevelopment
Copy link
Member

I have tested this item ✅ successfully on 3b028a3


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

@jeckodevelopment
Copy link
Member

RTC


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

@joomla-cms-bot joomla-cms-bot added the RTC This Pull Request is Ready To Commit label Aug 22, 2016
@rdeutz rdeutz added this to the Joomla 3.6.3 milestone Aug 25, 2016
@rdeutz rdeutz merged commit 968e0c0 into joomla:staging Aug 25, 2016
@joomla-cms-bot joomla-cms-bot removed the RTC This Pull Request is Ready To Commit label Aug 25, 2016
@andrepereiradasilva andrepereiradasilva deleted the languaguefiles-not-needed branch August 25, 2016 21:17
roland-d pushed a commit to roland-d/joomla-cms that referenced this pull request Sep 11, 2016
…omla#11730)

* plg_content_pagebreak: only load language file when needed

* plg_content_vote: only load language file when needed

* check if language file already loaded on parent loadLanguage

* We don't need this anymore

* We don't need this anymore
roland-d added a commit to roland-d/joomla-cms that referenced this pull request Sep 11, 2016
…areable-draft-content

* origin/shareable-draft-content: (245 commits)
  Implement shareable draft links
  Cleaned up shared drafts view Added front-end token generarion
  Implement shared drafts view
  Remove obsolete file
  use only root (joomla#11703)
  com_search category results not displaying date (joomla#11802)
  warnings and errors, not notices ... (joomla#11801)
  [installation] Add javascript message titles and ajax errors strings (joomla#11800)
  Regression: Normalising head links and correcting hreflang for menu items associations (joomla#11769)
  Refactor allowEdit of backend category controller (joomla#11547)
  [com_contact] Move event trigger to correct place (joomla#11719)
  Improve the accessibility of the top menu in ISIS part 2 (joomla#11729)
  Show file extension (joomla#11776)
  change button -> a for the modal close button (joomla#11787)
  Small Grammar change (joomla#11788)
  Change message type to error when download of update package fails (joomla#11791)
  these are warnings not messages ... (joomla#11799)
  [plg_content_vote|pagebreak] Load language files only when needed (joomla#11730)
  [plg_system_stats] Load plugin language files only when needed (joomla#11728)
  Fix creation performance of form element menuparent, (slow down in menu item edit form, for item that belongs to large menu) (joomla#11628)
  ...

# Conflicts:
#	administrator/components/com_admin/script.php
#	administrator/components/com_content/models/shared.php
#	administrator/components/com_content/views/shared/tmpl/default.php
#	administrator/language/en-GB/en-GB.xml
#	administrator/language/en-GB/install.xml
#	administrator/manifests/files/joomla.xml
#	administrator/manifests/packages/pkg_en-GB.xml
#	installation/language/en-GB/en-GB.xml
#	language/en-GB/en-GB.xml
#	language/en-GB/install.xml
#	libraries/cms/pagination/pagination.php
#	libraries/cms/version/version.php
#	libraries/joomla/authentication/authentication.php
#	libraries/joomla/form/fields/color.php
#	libraries/joomla/form/fields/email.php
#	media/system/js/share-uncompressed.js
#	media/system/js/share.js
#	plugins/content/vote/vote.php
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.

6 participants