• REGISTRATION REQUIREMENTS:

    Your username here MUST MATCH your XenForo username (connected to your XF license).

    Once you have registered here, then you need to start a conversation at xenforo.com w/Bob and provide the following:
    1. Your XenForo License Validation Token
    2. The Domain Name associated with the License
    NOTE: Your account will be validated once ALL requirements are verified/met. Thank you for your patience.

Custom Field Descriptions Do Not Update

DeviateDefiant

Member
SC Premium
I have a feeling this is a localised issue @Bob as others would have reported it by now. When I update custom field descriptions the new item page doesn't reflect the changes. I've just upgraded to 2.2.1 over 2.2.0 which I was running previously, and have ran any Cron entries/Cache rebuilds I thought could be relevant.

Any ideas?

Also another small one, occasionally the homepage BXSlider misses out several fields literally just outputting the image, title, and then nothing else leaving the bottom part of the block missing. I can't get my head around that one at all, it's literally just that item and others are fine. Also, a few reports that I've only seen once myself that the items fail to load entirely.

Is it possible I have a corrupt garage entry somewhere which is causing the occasional bugs? I have every item set to featured so that the widget has a pseudo-random generator, load is no issue as it's cached every 60 seconds.
 
Thats because custom fields for items are CACHED in the item record and only get updated when there is a saved action on the item itself. IIRC, I've added a rebuild custom fields cache step to the rebuild showcase items functionality (which you would have to manually run after making a change to a custom field in the backend).

A corrupt item can do that. Have you tried to edit that item?
 
It's not just on already created items but when adding a new one as well, I've manually run the item rebuild and neither a new item or existing are reflecting the custom field description changes. I'm basically trying to be more specific about the validation requirements on each field as (I know you're already aware) lots of members have issues tracking down what field they haven't filled out correctly.

I haven't tracked down the item itself at all, however I did find one item that was showing in two different members signatures. The items itself was only showing itself as associated with one. The funny thing is these are two different account's the same person used but I still don't see the connection as the showcase software doesn't go looking at cookies or anything right? Unfortunately one of the admins deleted it before I could investigate further.
 
I am 100% sure that what you are having problems with is do to the CACHE fields that belong to both the CATEGORY and ITEM (which are used for the helpers to display the data). None of the data stored in the custom fields tables is used anywhere except for the BACKEND administration. All FRONTEND display is done with HELPERS and pulls from the 2 caches fields (the Category that the item belongs to has a field named field_cache and the item itself has a field named custom_item_fields).

Rebuild the Categories Cache after changing the Description Field of a custom Field. If that doesn't work, try editing one of the categories and save it. The description is stored in the category field_cache field.

I'd need to examine the issue first hand. Its all a guess without being able to see it in action and examine the records of the item(s) involved.
 
I've already tried running the cache for the category itself and it didn't work, just tried again. Also just tried manually saving a category to no avail either. Unfortunately I just can't shift those cached copies of the field descriptions.

You're welcome to have a nosey mate, I can grant your account admin again and PM you phpMyAdmin details?
 
sure, but it will have to wait as I am just about ready to head out to the last game (college football) of the season. Just send me details and I can look later tonight/tomorrow (or when ever you are online in the next few days)
 
That's fine mate, no pressure, I've been backburnering sorting out the descriptions for ages anyway - everytime I see a user not be able to submit it kicks me up the arse :rolleyes:

I'll PM them now bud.
 
  • Like
Reactions: Bob
Mate, no matter what I try I cannot update these fields. The description field in the database custom field table is empty, manually sticking something in does nothing, rebuilding categories, items or any other rebuild option doesn't update them. I've tried disabling and re-enabling the field, changing it's placement, it's display type (radio/drop-down). Disabling and re-enabling a category, all kinds of playing about and I'm at an absolute loss here.

My "custom_field_edit" template is completely stock, the item_create and item_edit are modified, but the values have to be pulled from somewhere right? In the various BLOB data relating to fields in the various Showcase tables I can't even find the descriptions.
 
The description field in the database custom field table is empty
There is no description field. Custom Field descriptions are not stored in the nflj_showcase_custom_field table. They are stored as PHRASES. If you look at your phrases and do a search for sc_custom_field_fieldid_desc, you will see your description phrase. The Field Title and Choices Titles are also stored as phrases.

You are probably looking at the field named 'fs_description'. That is the FIELD SEARCH description... ie, the description that is displayed on the field search form and is part of the General Options Tab when creating/editing a field.

Here is an example of one of the methods in the Custom Field Model. This one is used by the prepareCustomField method. It prepares the Description for the Create and Edit forms. During that same process, the TITLE (which is also stored as a PHRASE) is also prepared.
PHP:
    /**
     * Gets the field's description phrase name.
     *
     * @param string $fieldId
     *
     * @return string
     */
    public function getCustomFieldDescriptionPhraseName($fieldId)
    {
        return 'sc_custom_field_' . $fieldId . '_desc';
    }

It COULD be an issue with your PHRASES.

I hate to do it, but I am going to HAVE to troubleshoot this on your site as I can't waste time guessing (and its isolated to your site). Send me a inbox with Admin CP access (full admin so I can access templates, TMs, Phrases, Showcase Custom Fields) and FTP access (so I can add debugging to files if need to get that far in depth).
 
Mate, no need - you've just solved it for me with pointing me to the phrases, turns out I got set a custom value for the phrases, hence why changing the master value (which the custom field options changes) does nothing. No idea why this is the case, but I now know how to solve it - thank you.

xenforo_showcase_custom_field.png
 
I'm using core xenforo datawriter class to update the phrase (which updates the MASTER PHRASE). When changed, you SHOULD be getting an out of date phrase warning similar to the out of date template warning.

PHP:
        $descriptionPhrase = $this->getExtraData(self::DATA_DESCRIPTION);
        if ($descriptionPhrase !== null)
        {
            $this->_insertOrUpdateMasterPhrase(
                $this->_getDescriptionPhraseName($fieldId), $descriptionPhrase
            );
        }

PHP:
    /**
     * Inserts or updates a master (language 0) phrase. Errors will be silently ignored.
     *
     * @param string $title
     * @param string $text
     * @param string $addOnId
     * @param array $extra
     */
    protected function _insertOrUpdateMasterPhrase($title, $text, $addOnId = '', array $extra = array())
    {
        $this->_getPhraseModel()->insertOrUpdateMasterPhrase($title, $text, $addOnId, $extra,  array(
            XenForo_DataWriter_Phrase::OPTION_REBUILD_LANGUAGE_CACHE => false,
            XenForo_DataWriter_Phrase::OPTION_RECOMPILE_TEMPLATE => false
        ));
        $this->_triggerLanguageRebuild = true;
    }
 
It definitely updates the master phrase just fine, however I get no phrase warning whatsoever - why I'm not sure, but this is certainly liveable - I've now updated all the descriptions :)
 
Back
Top