[SOLVED] About adding custom field column "modified_by" (modifier name) to backend items manager

More
8 years 5 months ago - 8 years 5 months ago #63057 by fortino
Hi everyone,

I find out a little issue using the custom columns feature in backend.
The field "modified_by" is not displayed even if has values.

After a lot of debug I discovered this field is correclty displayed on frontend but not in backend.

I solved doing an override of the items view of the administrator.

The file involved is :
/administrator/components/com_flexicontent/views/items/tmpl/default.php
You can override it putting the file here [in case you're using ISIS template]:
/administrator/templates/isis/html/com_flexicontent/items/default.php

here's the originale code:
Code:
<?php foreach($this->extra_fields as $_field) :?> <td> <?php // Clear display HTML just in case $field = clone($_field); // quickly make a shallow copy of the fields object to avoid assignments of various member variables being persistent // Field value for current item $field_value = isset($row->fieldvalues[$field->id]) ? $row->fieldvalues[$field->id] : false; // Create field's display HTML, via calling FlexicontentFields::renderField() for the given method name FlexicontentFields::renderField($row, $field, $field_value, $method=$field->methodname); // Output the field's display HTML echo @$field->{$field->methodname}; ?> </td> <?php endforeach; ?>

Here's my patch [maybe usefull until the bug is officially solved].
I don't know if there's redundancies with similar function already used, anyway the main problem is both $item->muname AND $item->modifier are NULL in backend.
After a while a discover the function supposed to do this [getItemFields]
Code:
<?php foreach($this->extra_fields as $_field) :?> <td> <?php // Clear display HTML just in case $field = clone($_field); // quickly make a shallow copy of the fields object to avoid assignments of various member variables being persistent // Field value for current item $field_value = isset($row->fieldvalues[$field->id]) ? $row->fieldvalues[$field->id] : false; /*SG MOD*/ $user = JFactory::getUser(); $aid = JAccess::getAuthorisedViewLevels($user->id); $cicci = array($row); $_vars = null; FlexicontentFields::getItemFields($cicci, $_vars, $_view=FLEXI_ITEMVIEW, $aid); /*end SG MOD*/ // Create field's display HTML, via calling FlexicontentFields::renderField() for the given method name FlexicontentFields::renderField($row, $field, $field_value, $method=$field->methodname); // Output the field's display HTML echo @$field->{$field->methodname}; ?> </td> <?php endforeach; ?>

SG
Last edit: 8 years 5 months ago by ggppdk.

Please Log in or Create an account to join the conversation.

More
8 years 5 months ago - 8 years 5 months ago #63065 by ggppdk
Hello

we have made a fix for this
- please note that due to the fix, after upgrading FLEXIcontent, your template override will no longer work

to test fix now:
Click download zip from:
github.com/FLEXIcontent/flexicontent-cck/tree/3.0.x-stable

and install via extension manager in testing website


-- Flexicontent is Free but involves a big effort on our part.
Like the our support? (for a bug-free FC, despite having a long list of functions) Like the features? Like the ongoing development and future commitment to FLEXIcontent?
-- Add your voice to the FLEXIcontent JED listing with a 5-star...
Last edit: 8 years 5 months ago by ggppdk.

Please Log in or Create an account to join the conversation.

Moderators: vistamediajoomlacornerggppdk
Time to create page: 0.389 seconds
Save
Cookies user preferences
We use cookies to ensure you to get the best experience on our website. If you decline the use of cookies, this website may not function as expected.
Accept all
Decline all
Essential
These cookies are needed to make the website work correctly. You can not disable them.
Display
Accept
Analytics
Tools used to analyze the data to measure the effectiveness of a website and to understand how it works.
Google Analytics
Accept
Decline