Loading...
 
Skip to main content

Article type not maintained on editing

Status
Open
Subject
Article type not maintained on editing
Version
5.x
Category
  • Usability
  • Patch
Feature
Article
Submitted by
prisma
Lastmod by
prisma
Rating
(0)
Description
When editing an article the type is reset to the first in the list. This is due to an useless? foreach loop inside tiki-edit_article.php . See the patch attached for a solution.
Solution
Copy to clipboard
*** ../tiki-5.0/tiki-edit_article.php 2010-05-24 16:55:44.000000000 +0200 --- tiki-edit_article.php 2010-07-26 23:09:01.000000000 +0200 *************** *** 464,477 **** // get list of valid types $types = $artlib->list_types_byname(); ! if (array($types)) { ! foreach ($types as $type=>$val) { ! break; ! } ! } else { $type = ''; } ! $smarty->assign('type', $type); if ($prefs["article_custom_attributes"] == 'y') { $article_attributes = $artlib->get_article_attributes($_REQUEST["articleId"]); $smarty->assign('article_attributes', $article_attributes); --- 464,474 ---- // get list of valid types $types = $artlib->list_types_byname(); ! if (!array($types)) { $type = ''; + $smarty->assign('type', $type); } ! if ($prefs["article_custom_attributes"] == 'y') { $article_attributes = $artlib->get_article_attributes($_REQUEST["articleId"]); $smarty->assign('article_attributes', $article_attributes);
Importance
7
Priority
35
Demonstrate Bug on Tiki 19+
Demonstrate Bug (older Tiki versions)
Ticket ID
3502
Created
Monday 26 July, 2010 21:13:26 UTC
by prisma
LastModif
Monday 26 July, 2010 21:17:28 UTC


Show PHP error messages