1. 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.

[2.2.1] No user profile tab

Discussion in 'Showcase Support' started by Stuart Wright, Sep 27, 2014.

  1. Stuart Wright

    Stuart Wright Member Showcase

  2. Bob

    Bob Developer Staff Member

    Do you have the options set?

    Selection_347.png
     
  3. Stuart Wright

    Stuart Wright Member Showcase

    Yes, I checked that setting. It is ticked.
     
  4. Bob

    Bob Developer Staff Member

    Do you have the 3 TM's associated with the profile disabled for any reason?

    Selection_349.png
     
  5. Bob

    Bob Developer Staff Member

    Just going step by step here... if those 3 are enabled, then the next step is to make sure the showcase_count field is in the xf_user table

    Check the xf_user table and make sure there is a field named: showcase_count

    This field was added in Showcase version 1.3.0 Beta 1, so its been there for awhile now

    if the field is there, can you tell me what value is set for YOUR record? It should be 1, since you have 1 showcase item. If its 0, change it to 1

    If the field is missing, you will need to add it

    PHP:
    ALTER TABLE xf_user ADD showcase_count int(10unsigned NOT NULL DEFAULT '0' 
    Since you only have 6 showcase items, you can quickly set the value to 1 for the 6 showcase item users.
     
  6. Stuart Wright

    Stuart Wright Member Showcase

    The field is there, but my showcase count is zero. I don't think any of your cache rebuild routines for showcases fixes the showcase count in the user table.
     
  7. Bob

    Bob Developer Staff Member

    You'll need to manually update the other 5 Item owners as well as it doesn't look like they have data either.

    There is a method available. I can add this to the cache rebuilds (Rebuild Showcase User Item Counts)

    PHP:
        /**
         * Updates the showcase_count field in the xf_user table for all users that have at least 1 visible item.
         * This is mainly used for the install file when the showcase_count field was added to the xf_user table.
         * Can be fired via CRON for routine maintenance or rebuild count
         */
        
    public function updateUserShowcaseCount()
        {
            
    $userIds $this->_getDb()->fetchCol('
                SELECT DISTINCT user_id
                FROM xf_nflj_showcase_item
                WHERE item_state = "visible"
            '
    );
       
            foreach (
    $userIds as $userId)
            {
                
    $itemCount $this->_getDb()->fetchOne('
                    SELECT COUNT(*) as count
                    FROM xf_nflj_showcase_item
                    WHERE user_id = ?
                        AND item_state = "visible"
                '
    $userId);
                   
                
    $this->_getDb()->update(
                    
    'xf_user',
                    array(
    'showcase_count' => $itemCount),
                    
    'user_id = ' $userId
                
    );
            }
        }
     
  8. Stuart Wright

    Stuart Wright Member Showcase

    Ran a query to fix it and the tab shows up. Thanks, Bob.
     
    Bob likes this.
  9. Bob

    Bob Developer Staff Member

    Selection_350.png
     
    Stuart Wright likes this.
  10. Stuart Wright

    Stuart Wright Member Showcase

  11. Bob

    Bob Developer Staff Member

    run the 'Rebuild Showcase Categories' (Tools >> Rebuild Caches). That will rebuild the item counts for each category.
     
    Stuart Wright likes this.
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.