2011-04-26, 00:32:01
Raffee Wrote: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()
instead ofCode:$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
instead ofCode:entities : false,
Code:entities : true,
* in function save_article()
instead ofCode:$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
andCode:# WYSIWYG editor language (default en)
define('GSEDITORLANG', 'pl');
but I'm not sure if it does mattersCode:# 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.
Thanks for this tips! I have copy/pasted that code into the news-plugin, and it finally shows the post with special characters in the admin-site. But I still have some strange problems. When I am uploading this plugin to my site, the whole site get an internal error (500). When I delete the file from the webserver, the site is back up and running again instantly. I am running GetSimple 3, I updated just a couple of hours ago.
Another strange thing is that to test this, I installed GetSimple 3 on one of my other webservers, and uploaded the same confiruged file. No internal error this time, but the page where I am supposed to show the news doesnt show me other then the title, and when I press "Save/Update article", all text/photos in "Content" and in "Excerpt" disappear.
Any thougts on this? All help is very much appreciated.