Гость
28 Авг 2019 10:38

Hello, I'm using Cobalt 8 (latest version) and I'm using it as a glossary on the website (Joomla! 3.9.11, PHP 7.3.8). When I turn on the glossary plugin, the articles contents is not shown at all. Does anyone know what could be the problem? Thank you.

Последние изменения: 29 Окт 2019


Sergey
Total posts: 13,748
01 Сен 2019 08:24

I recently revised this plugin. Please make sure you have latest 8.18 version.


Гость
08 Окт 2019 22:39

Hello,

I installed this plugin (together with Cobalt latest version 8.773-Stable), but I get the following errors:

before the article body:

Warning: preg_replace(): Unknown modifier 'N' in /plugins/content/glossary/glossary.php on line 94
Warning: preg_replace(): Unknown modifier 'c' in /plugins/content/glossary/glossary.php on line 94
Warning: preg_replace(): Unknown modifier 'd' in /plugins/content/glossary/glossary.php on line 94
Warning: preg_replace(): Unknown modifier 'r' in /plugins/content/glossary/glossary.php on line 94

and after the article body:

Warning: preg_replace(): Unknown modifier 'N' in /plugins/content/glossary/glossary.php on line 94
Warning: preg_replace(): Unknown modifier 'c' in /plugins/content/glossary/glossary.php on line 94
Warning: preg_replace(): Unknown modifier 'd' in /plugins/content/glossary/glossary.php on line 94
Warning: preg_replace(): Unknown modifier 'r' in /plugins/content/glossary/glossary.php on line 94

I use Joomla! 3.9.12 on PHP 7.2.9.


Гость
10 Окт 2019 17:20

Hello again,

I noticed there are some mistakes in the code.

The first occurrence of

htmlspecialchars($vall->field_value, ENT_COMPAT, 'UTF-8'),

should be replaced for $vall->title, otherwise the contents appears as title too.

I tested the component and plugin on two websites. On one of them it worked better, but it still added the tooltipr code within the HTML tags. The regex that works for me is "~\b(" . preg_quote($vall->title) . ")\b(?![^<]*>)~", the whole line being:

$article->text = preg_replace("~\b(" . preg_quote($vall->title) . ")\b(?![^<]*>)~", $string, $article->text);

Regards, George

(I'd like to ask some admin to delete the first message, as the code is messed up and I have no way to delete it myself. Thanks.)


Sergey
Total posts: 13,748
29 Окт 2019 05:50

That is almost exactly what I have in latest Glossary plugin.

Работает на Cobalt