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
- 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+
-
This bug has been demonstrated on show2.tiki.org
Please demonstrate your bug on show2.tiki.org
Show.tiki.org is not configured properlyThe public/private keys configured to connect to show2.tiki.org were not accepted. Please make sure you are using RSA keys. Thanks.
- Demonstrate Bug (older Tiki versions)
-
This bug has been demonstrated on show.tikiwiki.org
Please demonstrate your bug on show.tikiwiki.org
Show.tiki.org is not configured properlyThe public/private keys configured to connect to show.tikiwiki.org were not accepted. Please make sure you are using RSA keys. Thanks.
- Ticket ID
- 3502
- Created
- Monday 26 July, 2010 21:13:26 UTC
by prisma - LastModif
- Monday 26 July, 2010 21:17:28 UTC