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.

Renaming custom field IDs

Discussion in 'Showcase Support' started by Ludachris, Feb 21, 2018.

  1. Ludachris

    Ludachris Active Member AMS Premium CAS Premium RMS Premium SC Premium UBS Premium

    I know you can't do it in the admin cp. But let's say there was a case where you needed to change the ID of a custom field. Would it be a matter of going into phpmyadmin and editing those field IDs? Which tables need to be edited for each field?

    And why is it that the IDs can't be changed in the admin cp? Just curious.
     
  2. Bob

    Bob Developer Staff Member

    You CAN NOT change the field_id of a custom field! This says so right on the FORM for very specific reasons. Manually changing it will screw things up royally!

    Data like Field Title, Field description and Field Choices are stored as PHRASES and the phrase names include the field_id of the custom field.

    Title Phrase: sc_custom_field_FIELD_ID
    Description Phrase: sc_custom_field_FIELD_ID_desc
    Choice Phrase: sc_custom_field_FIELD_ID_choice_CHOICE_ID

    The field_id is also included as data in LOOKUP tables.

    LOOKUP TABLE: xf_nflj_showcase_custom_field_category (the field_id column in this table links with the field_id column in the xf_nflj_showcase_custom_field table

    LOOKUP TABLE: xf_nflj_showcase_custom_field_value (the field_id column in this table links with the field_id column in the xf_nflj_showcase_custom_field table

    Field Id's are also stored in CACHE for various use cases.

    This is Core XenForo architecture and standards. User Fields, Resource Fields, Media Fields etc all use the same standard custom fields architecture. I follow that same standard with all my addons.
     
  3. Ludachris

    Ludachris Active Member AMS Premium CAS Premium RMS Premium SC Premium UBS Premium

    Alrighty then - I will just delete the fields and create new ones then. Sounds like that's the way to do it. Thanks for explaining why it can't be done ;)
     
  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.