2011-04-11, 22:35:01
Connie Wrote:I tested Version 1.2.4 with GS 3.0
I managed somehow to create an article without title. This article still exists in the list of articles, but I cannot edit it anymore, I can only delete it.
On the other hand the article is not in the news-output, but an error message: "The requested article does not exist."
So I have to delete that article and rewrite it, but I never get it in the original sequence
PS: in the meantime, I have 3 articles without titles, which are not listed and cannot be edited
I've got the same, but I made some investigation and realized that it's up to localization/encoding/entities in the plugin. Whenever I've put non-ascii character, for example Polish 'ó' (oacute), into the title - article title completely disappeared. The XML file stayed here, but with the <title> tag empty. When I edit the physical file and put the title without non-english chars - article shows again and can be edited from admin panel.
I'm using GS 3.0,
News Manager v.1.2.4,
i18n plugin v.1.1.1 with Polish language files (pl_PL.php)
and Polish GS language file
with pl.js file for CKEditor.
Finally here's my current news_manager.php code (excerpts):
* in function article_overview()
Code:
$title = htmlspecialchars_decode($data->title, ENT_QUOTES);
Code:
$title = html_entity_decode($data->title, ENT_QUOTES, 'UTF-8');
* in function edit_article($id) in CKEDITOR.replace parameters
Code:
entities : false,
Code:
entities : true,
* in function save_article()
Code:
$title = htmlspecialchars($_POST['post-title'], ENT_QUOTES, 'UTF-8', false);
$content = htmlspecialchars($_POST['post-content'], ENT_QUOTES, 'UTF-8', false);
$excerpt = htmlspecialchars($_POST['post-excerpt'], ENT_QUOTES, 'UTF-8', false);
Code:
$title = htmlentities($_POST['post-title'], ENT_QUOTES, 'UTF-8');
$content = htmlentities($_POST['post-content'], ENT_QUOTES, 'UTF-8');
$excerpt = htmlentities($_POST['post-excerpt'], ENT_QUOTES, 'UTF-8');
My GSCONFIG.PHP file got
Code:
# WYSIWYG editor language (default en)
define('GSEDITORLANG', 'pl');
Code:
# Set PHP locale
# [url]http://php.net/manual/en/function.setlocale.php[/url]
setlocale(LC_ALL, 'pl_PL');
Now my news_manager plugin works as I wanted.
I'm pretty new in GetSimple and PHP (especially with security risk) so tell me if I am wrong with this changes.