- This topic has 3 replies, 2 voices, and was last updated 7 years, 6 months ago by
zanedickens.
Viewing 3 reply threads
-
AuthorPosts
-
-
July 16, 2014 at 4:18 pm #2016
zanedickensMemberHi Steve,
I’ve run into another bug that only occurs on one of my CPTs, it’s in production now so a quick fix would be really appreciated.
Here’s the code:
<?php /* Title: Please Complete All Questions Description: Manager of the Year Award Meta-Box Post Type: individual_manager Context: normal */ /************************************************************************************************************************************************ QUESTIONS FOR MANAGER OF THE YEAR AWARD ************************************************************************************************************************************************/ // DESCRIPTION piklist('field', array( 'type' => 'html' ,'field' => 'award_description' ,'label' => __('Award Description') ,'value' => ' <p>Any person who is currently employed as a senior (line-) manager (executive) or business unit manager responsible for the operations in a business processing centre, who has a minimum of one uninterrupted year in that position. This award is given to a person who manages an effective and efficient Business Processing Centre that supports its customers and caters to the needs of its staff and support teams.</p><p>Please note that this category is not for managing directors and/or company directors except where the entrant is directly involved in operations ie. 50% or more of your time is spent in operations.</p>' )); // QUESTION 1 piklist('field', array( 'type' => 'textarea' ,'field' => 'manager_intro' ,'label' => __('Background of Entrant') ,'attributes' => array('rows' => 6) ,'columns' => '12' )); piklist('field', array( 'type' => 'textarea' ,'field' => 'manager_intro_2' ,'label' => __('Purpose of Unit') ,'description' => __('Describe the purpose of the unit') ,'attributes' => array('rows' => 6) ,'columns' => '12' )); piklist('field', array( 'type' => 'file' ,'field' => 'manager_intro_3' ,'label' => __('Organogram of business unit indicating:') ,'description' => __('<ul> <li>No. of People reporting</li> <li>Role reporting to</li> <li>No. of seats managing</li> <li>Support areas</li> </ul>') ,'scope' => 'post_meta' )); // QUESTION 2 piklist('field', array( 'type' => 'textarea' ,'field' => 'manager_question_2' ,'label' => __('1. What are your top 5 key performance areas? Please provide 6 months results for each in an Excel Spreadsheet.') ,'attributes' => array('rows' => 6) ,'columns' => '12' )); piklist('field', array( 'type' => 'file' ,'field' => 'manager_question_2_file' ,'description' => __('Please upload the results spreadsheet.') ,'scope' => 'post_meta' )); // QUESTION 3 piklist('field', array( 'type' => 'textarea' ,'field' => 'manager_question_3' ,'label' => __('2. Customer Services / Sales Strategy / Tech Support and /or collections – give examples of your strategy which you implemented and how this has impacted the bottom line?') ,'attributes' => array('rows' => 6) ,'columns' => '12' )); // QUESTION 4 piklist('field', array( 'type' => 'textarea' ,'field' => 'manager_question_4' ,'label' => __('3. What budget control do you have and results against measures, where applicable?') ,'attributes' => array('rows' => 6) ,'columns' => '12' )); // QUESTION 5 piklist('field', array( 'type' => 'textarea' ,'field' => 'manager_question_5' ,'label' => __('4. What people development initiatives have you implemented in the past 12 months to create succession planning in your organisation?') ,'attributes' => array('rows' => 6) ,'columns' => '12' )); // QUESTION 6 piklist('field', array( 'type' => 'textarea' ,'field' => 'manager_question_6' ,'label' => __('5. Overview your staff retention and wellness strategies?') ,'attributes' => array('rows' => 6) ,'columns' => '12' )); // QUESTION 7 piklist('field', array( 'type' => 'textarea' ,'field' => 'manager_question_7' ,'label' => __('6. What process do you follow to benchmark yourself against your competition in South Africa?') ,'attributes' => array('rows' => 6) ,'columns' => '12' )); // QUESTION 8 piklist('field', array( 'type' => 'textarea' ,'field' => 'manager_question_7' ,'label' => __('7. What challenges have you faced in the last 6 months as a manager and how have you overcome that?') ,'attributes' => array('rows' => 6) ,'columns' => '12' )); // QUESTION 9 piklist('field', array( 'type' => 'textarea' ,'field' => 'manager_question_7' ,'label' => __('8. What has been your greatest success over the last 12 months and why?') ,'attributes' => array('rows' => 6) ,'columns' => '12' )); // FILE UPLOAD piklist('field', array( 'type' => 'file' ,'field' => 'manager_question_8' ,'label' => __('9. Supporting Documents','piklist') ,'description' => __('Please upload any supporting documentation that is relevant and supports your entry. To delete an item, click Add Media, click the item, and then click "Delete Permenantly. Update your entry and the thumbnail will be removed.','piklist') ,'scope' => 'post_meta' )); ?>I cannot see what would be causing the fields to duplicate over and over. It only occurs for questions 7, 8, 9 (As Marked by Comments) – Only repeats the textarea not the question/label.
Here’s a screenshot:
https://www.dropbox.com/s/alcr1cnhrstrfri/Screenshot%202014-07-16%2022.07.53.png
Thanks again,
Z -
July 16, 2014 at 4:31 pm #2017
zanedickensMemberFound the issue. Three fields with the same name. Copy and paste error.
*Zane gets more coffee*
-
July 16, 2014 at 9:45 pm #2018
SteveKeymasterYup… duplicate fields can cause things to blow up. 😉
-
July 22, 2014 at 2:09 pm #2038
zanedickensMemberIndeed. Problem solved 🙂 I now watch that kind of thing like a hawk, running searches on field names just to be sure.
-
-
AuthorPosts
Viewing 3 reply threads
- The topic ‘Bug – Fields Duplicating on Save (Urgent)’ is closed to new replies.