I'm sorry for using the forum, but it keep give me an error whilst trying to post the bug in the bugtracker.
When you submit a new article (using the News module) you can choose between 'Plain text' and 'Formatted text' for both the header and body of the news.
It seems to me that these values are not stored in the DB and also never used.
I read the code and I've found only this reference:
// calculate the format type
$args['contenttype'] = ($args['bodytextcontenttype']%4)*4 + $args['hometextcontenttype']%4;
IIRC contenttype is sent to the DB by DBUtil, but there isn't an entry for it in pntables.php, then this value is simply discarded.
Moreover in pntables there is an entry for 'format_type' that, if I'm not wrong, it's never created.
Maybe contenttype'd be format_type?
Anyway I can't also find a point where format_type is required.
Bye, Giacomo.
--
Zikula Italia
SimpleGallery
Watch
GitHub Core
Show your support for Zikula! Sign up at Github account and watch the Core project!
GitHub Modules
- michiel responded to »password problem« 10:01 AM
- mazdev responded to »Hide "Register new account" and change template to 3 col« 07:50 AM
- mesteele101 created topic »Zikula 1.3.3 - Site Search 1.5.2 - Unable to turn off plug-ins« 07:48 AM
- mesteele101 responded to »ERR (3): E_USER_ERROR: Smarty error: [in pagesvar:pagesitem2en line XXX]…« 25. May
- mazdev responded to »Pages 2.5.0 and updating - Page not found« 25. May
- mesteele101 responded to »Zikula 1.3.3 - Selecting a category in Pages not working« 25. May
- mdee created topic »How to implement returnpage ?« 25. May
Zikula Blog
- Anatomy of Open Source Projects on Mar 07
- Continuous Review on Mar 01
- Not Invented Here on Feb 24
- How to Contribute Your Code at Github on Jan 13
- 10 Steps to Coding-Nirvana: Tips for Successful Module Writing on Nov 12
- Submitting Bug Report Tickets That Get Results on Aug 17
- Cozi Tricks #1: Syntax Highlighting on Aug 07
Login
Bug in the News module
-
- Rank: Developer
- Registered: Mar 29, 2005
- Last visit: Mar 13, 2010
- Posts: 228
-
- Rank: Team Member
- Registered: Sep 06, 2006
- Last visit: May 09, 2010
- Posts: 2446
I've also see that problem, but not too deep to find the field problem...
About that 'format' IMHO the default one should be 'Formatted text' (HTML).
May check if the content is plain text (no htmlentities) and apply nl2br...
but that select format is not too much useful IMO.
--
- Mateo T. -
Mis principios... son mis fines -
- Rank: Developer
- Registered: Aug 23, 2003
- Last visit: May 31, 2010
- Posts: 1428
In the table definition there is indeed the format_type field
in pnadmin.php line 92 this field is being used during modification:
Code
// Get the format types. 'home' string is bits 0-1, 'body' is bits 2-3.
$item['hometextcontenttype'] = ($item['format_type']%4);
$item['bodytextcontenttype'] = (($item['format_type']/4)%4);
But in the end the value is never used for nl2br or something like that.
Being able to enter simply plain text where nl are converted into br is a good feature,
but maybe this is taken care of by DBUtil already?
But is does not get filled during creation, cause there only the
--
campertoday.nl, Module development, Dutch Zikula Community -
- Rank: Team Member
- Registered: Jan 05, 2003
- Last visit: May 28, 2010
- Posts: 775
Quote
but maybe this is taken care of by DBUtil already
No, DBUtil doesn't alter data (other than the obligatory preforstore) ...
Greetings
R
- Moderated by:
- Support
