Fork me on GitHub

Bug in the News module  Bottom

  • 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
  • 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
  • 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
  • Quote

    but maybe this is taken care of by DBUtil already

    No, DBUtil doesn't alter data (other than the obligatory preforstore) ...

    Greetings
    R

This list is based on users active over the last 60 minutes.