Skip to content

Conversation

@infograf768
Copy link
Member

@infograf768 infograf768 commented Aug 24, 2016

Pull Request for Issue #11759

Summary of Changes

Adding urldecode for the $base as as for the languagefilter component associations
EDIT: took off that in final PR

Testing Instructions

Enable unicode alias in global configuration.
Multilingual site.
Enable Item associations on the language filter plugin as well as Alternate meta tags
Associate items. One of the items should have some utf8 glyph in its alias.
Display the items one after the other, each time looking source for the hreflang produced (and the <base link when the item with utf8 alias is displayed)

The results are different: one hreflang (and <base in one case) is percent encoded, the other is not.

Patch: all links are now pure UTF8. No more percent encoding.

Instead of

<link href="http://localhost:8888/testwindows/trunkgitnew/fr/instructions-multilangue/33-ultimes-v%C3%A9rifications.html" rel="alternate" hreflang="fr-FR" />
<link href="http://localhost:8888/testwindows/trunkgitnew/en/multi-lingual-steps-by-steps/34-last-checks.html" rel="alternate" hreflang="en-GB" />

You will now get

<link href="http://localhost:8888/testwindows/trunkgitnew/fr/instructions-multilangue/33-ultimes-vérifications.html" rel="alternate" hreflang="fr-FR" />
<link href="http://localhost:8888/testwindows/trunkgitnew/en/multi-lingual-steps-by-steps/34-last-checks.html" rel="alternate" hreflang="en-GB" />

when displaying one or the other associated item.

The base link will now be full utf8, example:
<base href="http://localhost:8888/testwindows/trunkgitnew/fr/instructions-multilangue/33-ultimes-vérifications.html" />

Documentation Changes Required

None

@infograf768
Copy link
Member Author

infograf768 commented Aug 24, 2016

Just found we still have an issue here. This PR solves ordinary items associations (articles, contacts, etc.) but NOT menu items associations (so in case of both we still have issues)
It looks like hreflang for menu items associations is broken when one alias is utf8 and contains non latin glyphs (Russian, Greek, Macedonian, Tamil)

@infograf768
Copy link
Member Author

Corrected the issue for menu items.
Now should work fine.

@infograf768 infograf768 changed the title Normalising head links Regression: Normalising head links and correcting hreflang for menu items associations Aug 24, 2016
@infograf768
Copy link
Member Author

This is not as simple as I thought... Help needed. :)

@infograf768
Copy link
Member Author

infograf768 commented Aug 24, 2016

remains to see if urldecode $base is not a pb

@infograf768
Copy link
Member Author

This PR now only takes care of the regression for associated menu items alternate and display as readable UTF8 the alternate links.

@brianteeman
Copy link
Contributor

I have tested this item ✅ successfully on 813d2bc

tested on a multilingual site with english, french and hebrew


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

@zero-24
Copy link
Contributor

zero-24 commented Aug 25, 2016

I have tested this item ✅ successfully on 813d2bc

works using ultimes-vérifications


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

@zero-24
Copy link
Contributor

zero-24 commented Aug 25, 2016

RTC. Thanks.


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

@joomla-cms-bot joomla-cms-bot added the RTC This Pull Request is Ready To Commit label Aug 25, 2016
@brianteeman brianteeman added this to the Joomla 3.6.3 milestone Aug 26, 2016
@rdeutz rdeutz merged commit d82499d into joomla:staging Aug 26, 2016
@joomla-cms-bot joomla-cms-bot removed the RTC This Pull Request is Ready To Commit label Aug 26, 2016
roland-d pushed a commit to roland-d/joomla-cms that referenced this pull request Sep 11, 2016
…tems associations (joomla#11769)

* urldecode all head links

* correcting also for menu items

* Preventing XSS... Thanks Andre

* Update languagefilter.php

* Taking of the chnage to the <base tag
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
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: (253 commits)
  Fixed conflict
  Added menu item
  Code cleanup
  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)
  ...

# Conflicts:
#	administrator/components/com_admin/script.php
#	administrator/components/com_content/controllers/article.php
#	administrator/components/com_content/controllers/articles.php
#	administrator/components/com_content/models/forms/article.xml
#	administrator/components/com_content/views/article/view.html.php
#	administrator/components/com_content/views/articles/view.html.php
#	components/com_content/views/form/tmpl/edit.php
#	libraries/cms/pagination/pagination.php
#	libraries/joomla/form/fields/email.php
#	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