[TYPO3-english] fe_users.comments field in cwt_community edit-profile

Tomas Norre Mikkelsen tnm.maillist at gmail.com
Tue Dec 9 15:15:11 CET 2008


I'll try again, here is a more deept description on the problem.


I have a problem with the cwt_community and cwt_feedit plugin.

I have my user profile and what to edit the fe_users.comments field to, i
have added the fe_users.title-field too, but there is not errors here.

I have made following in the class.tx_cwtcommunity_pi1.php

/* Added - BEGIN */

        $items['title']['label'] =

        //$items['title']['helptext'] =

        $items['title']['error_msg'] =

        $items['comments']['label'] =

        //$items['comments']['helptext'] =

        $items['comments']['error_msg'] =

I have also added:

$content.= $form->getElement("www");

$content.= $form->getElement("tx_cwtcommunityuser_image");

//$content.= $form->getElement("tx_cwtcommunityuser_sex");

//$content.= $form->getElement("tx_cwtcommunityuser_gallery_activated");

// new line
$content.= $form->getElement("comments");

When i use the debug mode for cwt_feedit, i get my field list in the top.

This list contains the "comments" info so it must know something about :)

See the screenshot here:

but the list at beneth with text:
Fetching values from DATABASE...
Query: SELECT username FROM fe_users WHERE uid=52
Array ( [0] => Array ( [username] => mikkeltomas ) )

the array field [username] is not empty.. and the list does not have an
entry for "comments".

In the class.tx_feedit_pi1.php file has function:
FetchValueFromItem($item_key), i have test with:

// added to test directly to "comments" key

function fetchValueFromItem($item_key){

                if ($this->mode == "VIEW_EDITPROFILE" &&
$this->postvars["submit_delete"] == null){

                        // Check for eval_function twice


                        if ($twice) {


                        // added to test directly to "comments" key

                        //Do the query

                        if ($this->debug){ echo "Fetching values from

                        $res = $this->doDatabaseQuery("SELECT ".$item_key." FROM
".$this->table." WHERE uid=".intval($this->record_uid));

                        $res = $res[0][$item_key];

                } elseif($this->mode == "VIEW_EDITPROFILE" &&
$this->postvars["submit_delete"] != null){

                        if ($this->debug){ echo "Fetching values from
POST VARS...<br>";}

                         $res = $this->postvars[$item_key];

                } elseif ($this->mode == "VIEW_EDITPROFILE_ERROR" ||
$this->mode ==

                        if ($this->debug){ echo "Fetching values from
POST VARS...<br>";}

                        $res = $this->postvars[$item_key];

                } elseif ($this->mode == 'VIEW_EDITPROFILE_NEW') {

                        if ($this->debug){ echo "Fetching values from
POST VARS...<br>";}

                        $res = $this->postvars[$item_key];



                return $res;


This hardcode results in following,

Fetching values from DATABASE...
Query: SELECT comments FROM fe_users WHERE uid=52
Array ( [0] => Array ( [comments] => ) )

the array field [comments] is empty, thats were i got confused.. the field
contain data in the DB.

See: http://fritdrop.dk/fileadmin/debug/edit_profile_debug_1.png

My thoughts were that it is not on the list on:
http://fritdrop.dk/fileadmin/debug/edit_profile_debug_0.png because its
empty, but i don't understand why its empty.

Hope Someone can help me.. i a bit lost what to do to get this working.

Best Regards

2008/12/8 Tomas Norre Mikkelsen <tnm.maillist at gmail.com>:
> Hi,
> I have a problem with the fe_users.comments field, i want to be able
> to edit this field through my edit_profil, but i cannot get the plugin to
> accept it.
> The address field is almost the same type as comment, address is
> varchar(255) and comments is text, so i have implement the comments as the
> address is in class.tx_*.php file in /pi1/ but with no luck.
> When i view the profile, i have no problem "printing" the info from the
> comment field, but i what to edit it, to use it a my describtion.
> As i understand it, cwt_community profiles are read from fe_users table,
> or at least some of the information is, i cannot find out where else it
> should and what i could have done wrong.
> I have tested with some different fields from fe_users-table,
> following fields works: usergroup, fax
> but following feild _do_not_ work: crdata,lastlogin,comments
> Its the comments fields which i have to use, but tested with the other
> when trying to debug..
> Hope you can help me.
> Best Regards
> Tomas
> _______________________________________________
> TYPO3-english mailing list
> TYPO3-english at lists.netfielders.de
> http://lists.netfielders.de/cgi-bin/mailman/listinfo/typo3-english

More information about the TYPO3-english mailing list