?
avatar baijianpeng
baijianpeng
27 Apr 2016

Steps to reproduce the issue

  1. turn off SEF of Joomla core (v3.5.1)
  2. create a new article (since there is only one demo article in sample data).
  3. In this article CONTENT, insert a link to the other article, with non-SEF (original) URL, such as:

index.php?option=com_content&view=article&id=1:getting-started&catid=2&Itemid=101

  1. save the article.
  2. enable SEF in Joomla global configuration. ( ALL first 3 options "On", rename /htaccess.txt to /.htaccess).
  3. check the frontend pages.

Expected result

the link in the article content should be converted to SEF URL automatically.

Actual result

The link in the article content is still non-SEF, while other links for articles on menu or module had been converted to SEF URLs.

System information (as much as possible)

Joomla 3.5.1
PHP 5.6.15
Windows 10

Additional comments

avatar baijianpeng baijianpeng - open - 27 Apr 2016
avatar mbabker
mbabker - comment - 27 Apr 2016

The SEF plugin will only convert links if the string href="index.php? is found, and only the links on href attributes (see https://github.com/joomla/joomla-cms/blob/3.5.1/plugins/system/sef/sef.php#L97). A link that is displayed on the page that isn't part of an href attribute won't get converted.

avatar baijianpeng
baijianpeng - comment - 27 Apr 2016

OK, In fact I mean that is a value of href attribute.

Well, finally I test again on another Joomla installation , then realized that my problem can not be reproduced. Maybe it was something else wrong.

BTW, does the SEF plugin allow link started with slash (/) ? For example:

href="index.php?

and

href="/index.php?

Can they both be detected and converted?

Thank you.

avatar mbabker
mbabker - comment - 27 Apr 2016

No, it can't. The line I linked shows exactly what the SEF plugin is looking for. If the verbatim text href="index.php? is found it'll basically grab everything after the question mark and up to the next double quotation (assuming I've read the regex right).

avatar brianteeman brianteeman - change - 27 Apr 2016
Labels Added: ?
avatar brianteeman brianteeman - change - 27 Apr 2016
Status New Closed
Closed_Date 0000-00-00 00:00:00 2016-04-27 08:19:01
Closed_By brianteeman
avatar brianteeman brianteeman - close - 27 Apr 2016
avatar brianteeman brianteeman - close - 27 Apr 2016
avatar brianteeman
brianteeman - comment - 27 Apr 2016

Closed


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

avatar infograf768
infograf768 - comment - 27 Apr 2016

@baijianpeng
Using the Articles button in TinyMce (now present in the Tiny bar) will enter the correct type of link into your article content. It is also multilang aware.

For example, you will get after toggle:

<a href="index.php?option=com_content&amp;view=article&amp;id=151&amp;catid=21&amp;lang=es-ES&amp;Itemid=131" hreflang="es">Nuevo en la 2.5</a>
avatar baijianpeng
baijianpeng - comment - 27 Apr 2016

Thank you @infograf768 , but I do not use TinyMCE. Feel it very poor.

I used to usd CKeditor for Joomla (the one from CKsource official team) as
my favorite editor, but it was stopped.

Recently I am using Ark Editor, another Joomla editor based on CKeditor.

Thank you.

白建鹏

https://www.joomlagate.com/

微信公众号:joomlagate
新浪微博: @joomlagate


2016-04-27 16:27 GMT+08:00 infograf768 notifications@github.com:

@baijianpeng https://github.com/baijianpeng
Using the Articles button in TinyMce (now present in the Tiny bar) will
enter the correct type of link into your article content. It is also
multilang aware.

For example, you will get after toggle:

Nuevo en la 2.5


You are receiving this because you were mentioned.
Reply to this email directly or view it on GitHub
#10101 (comment)

Add a Comment

Login with GitHub to post a comment