0

We have the following issue:

Description of the problem We have a channel form script that submitted correct in ee3.5.8, but upon upgrade to ee5.2.6 we now get a required field error.

Transcribe module is installed, we have tried completely disabling the module and the error persists.

Error Messages With JSON parameter set to 'yes' (in the channel form script and with the assigned Ajax script disabled) we get:


{"success":0,"errors":[],"field_errors":{"transcribe__transcribe_language":"This field is required."},"entry_id":3390,"url_title":"2stabilise-as","channel_id":4}

With JSON parameter set to 'no' (in the channel form script) we get:



The form you submitted contained the following errors

    Language Association: This field is required.

Environment Details: - Version: 5.2.6 - PHP Version 7.0.33 - MySQL Version 5.6 - OS: macOS - Web Server: Apache

Template Code

The channel form code:


{exp:channel:form channel="directory" 
    return = "members/profile/updated"
    entry_id = "3390" 
    json = "no"
    id = "cform"
    class="form-horizontal"
    include_jquery="no"
    include_assets="no"
}

    <div class="form-group has-feedback">
        <label for="title" class="col-sm-2 control-label">Company</label>
        <div class="col-sm-10">
        {if "{embed:is_admin}"=="true"}
            <input type="text" name="title" id="title" value="{title}" size="50" maxlength="100" class="form-control input-lg">
        {if:else}
            <input type="text" value="{title}" class="form-control input-lg" disabled>
            <span class="text-muted glyphicon glyphicon-lock form-control-feedback" aria-hidden="true"></span>
        {/if}
        </div>
    </div>

    <div class="form-group has-feedback">
        <label for="url_title" class="col-sm-2 control-label"><a href="{path="members/details"}/{url_title}" target="_blank" title="See your directory listing&hellip;"><span class="fa fa-external-link"></span> Link</a></label>
        <div class="col-sm-10">
        {if "{embed:is_admin}"=="true"}
            <div class="input-group">
                <span class="input-group-addon" id="basic-addon3">{path="members/details"}</span>
                <input type="text" name="url_title" id="url_title" value="{url_title}" maxlength="75" size="50" class="form-control">
            </div>
        {if:else}
            <div class="input-group">
                <span class="input-group-addon" id="basic-addon3">{path="members/details"}/</span>
                <input type="text" disabled value="{url_title}" class="form-control">
                <span class="text-muted glyphicon glyphicon-lock form-control-feedback" aria-hidden="true"></span>
            </div>
        {/if}
        </div>
        <div class="col-sm-10 col-sm-offset-2">
            <p class="help-block"></p>
        </div>
    </div>

    <div class="form-group">
        <label for="member_email" class="col-sm-2 control-label">Company Website</label>
        <div class="col-sm-10">
            <input class="form-control input-lg" name="member_url" id="member_url" value="{member_url}">
        </div>
    </div>

    <div class="form-group">
        <label for="member_email" class="col-sm-2 control-label">Email</label>
        <div class="col-sm-10">
            <input class="form-control input-lg" name="member_email" id="member_email" value="{member_email}">
        </div>
    </div>

    <div class="form-group has-feedback">
        <label for="technical_authority" class="col-sm-2 control-label">Technical Authority</label>
        <div class="col-sm-10">
        {if "{embed:is_admin}"=="true"}
                <input type="text" name="technical_authority" id="technical_authority" value="{technical_authority}" class="form-control input-lg">
        {if:else}
            <div class="input-group">
                <input type="text" disabled value="{technical_authority}" class="form-control input-lg">
                <span class="text-muted glyphicon glyphicon-lock form-control-feedback" aria-hidden="true"></span>
            </div>
        {/if}
        </div>
        <div class="col-sm-10 col-sm-offset-2">
            <p class="help-block">The name of the Technical Authority</p>
        </div>
    </div>



<fieldset{if "{embed:is_admin}" == "false"} disabled{/if}>
    <legend>{exp:transcribe:translate name="address"}Address{/exp:transcribe:translate}:</legend>
    <div class="form-group has-feedback">
        <label for="member_address_1" class="col-sm-2 control-label">Line 1</label>
        <div class="col-sm-10">
        {if "{embed:is_admin}"=="true"}
            <input type="text" class="form-control" name="member_address_1" id="member_address_1" value="{member_address_1}">
        {if:else}
            <input type="text" class="form-control" diabled placeholder="{member_address_1}">
            <span class="text-muted glyphicon glyphicon-lock form-control-feedback" aria-hidden="true"></span>
        {/if}
        </div>
    </div>

    <div class="form-group has-feedback">
        <label for="member_address_2" class="col-sm-2 control-label">Line 2</label>
        <div class="col-sm-10">
        {if "{embed:is_admin}"=="true"}
            <input type="text" class="form-control" name="member_address_2" id="member_address_2" value="{member_address_2}">
        {if:else}
            <input type="text" class="form-control" diabled placeholder="{member_address_2}">
            <span class="text-muted glyphicon glyphicon-lock form-control-feedback" aria-hidden="true"></span>
        {/if}
        </div>
    </div>

    <div class="form-group has-feedback">
        <label for="member_address_3" class="col-sm-2 control-label">Line 3</label>
        <div class="col-sm-10">
        {if "{embed:is_admin}"=="true"}
            <input type="text" class="form-control" name="member_address_3" id="member_address_3" value="{member_address_3}">
        {if:else}
            <input type="text" class="form-control" diabled placeholder="{member_address_3}">
            <span class="text-muted glyphicon glyphicon-lock form-control-feedback" aria-hidden="true"></span>
        {/if}
        </div>
    </div>

    <div class="form-group has-feedback">
        <label for="member_address_4" class="col-sm-2 control-label">Line 4</label>
        <div class="col-sm-10">
        {if "{embed:is_admin}"=="true"}
            <input type="text" class="form-control" name="member_address_4" id="member_address_4" value="{member_address_4}">
        {if:else}
            <input type="text" class="form-control" diabled placeholder="{member_address_4}">
            <span class="text-muted glyphicon glyphicon-lock form-control-feedback" aria-hidden="true"></span>
        {/if}
        </div>
    </div>

    <div class="form-group has-feedback">
        <label for="member_address_city" class="col-sm-2 control-label">City</label>
        <div class="col-sm-10">
        {if "{embed:is_admin}"=="true"}
            <input type="text" class="form-control" name="member_address_city" id="member_address_city" value="{member_address_city}">
        {if:else}
            <input type="text" class="form-control" diabled placeholder="{member_address_city}">
            <span class="text-muted glyphicon glyphicon-lock form-control-feedback" aria-hidden="true"></span>
        {/if}
        </div>
    </div>

    <div class="form-group has-feedback">
        <label for="member_address_county" class="col-sm-2 control-label">County</label>
        <div class="col-sm-10">
        {if "{embed:is_admin}"=="true"}
            <input type="text" class="form-control" name="member_address_county" id="member_address_county" value="{member_address_county}">
        {if:else}
            <input type="text" class="form-control" diabled placeholder="{member_address_county}">
            <span class="text-muted glyphicon glyphicon-lock form-control-feedback" aria-hidden="true"></span>
        {/if}
        </div>
    </div>

    <div class="form-group has-feedback">
        <label for="member_country" class="col-sm-2 control-label">Country</label>
        <div class="col-sm-10">
        {if "{embed:is_admin}"=="true"}
            {exp:reegion_select:countries name="member_country" id="member_country" selected="{member_country}{region_alpha2}{/member_country}" class="form-control" type="alpha2"}
        {if:else}
            <input type="text" class="form-control" diabled placeholder="{member_country}{region_name}{/member_country}">
            <span class="text-muted glyphicon glyphicon-lock form-control-feedback" aria-hidden="true"></span>
        {/if}
        </div>
    </div>
</fieldset>



    <div class="form-group">
        <label for="member_map" class="col-sm-2 control-label">Map</label>
        <div class="col-sm-10">
            {!--field:member_map--}
            <div id="map" style="width:100%;height:16em"></div>
            <input name="member_map" id="member_map" value="{member_map}" type="hidden">
            <input id="places_search" class="form-control" placeholder="Town/City Zoom">
        </div>
    </div>

    <div class="form-group" style="padding:0 15px">
        <label for="member_description">Description</label>
        {field:member_description}
        {!--
        <div class="tinymce" name="member_description" id="member_description">{member_description}</div>
        --}
    </div>


{!--

    <div class="form-group has-feedback">
        <label for="member_image" class="col-sm-2 control-label">Logo/Image</label>

        <div class="col-sm-10">
            <p class="help-block"></p>
            <span class="glyphicon glyphicon-warning-sign hidden form-control-feedback" aria-hidden="true"></span>

{member_image}File name: {file_name}{/member_image}
<input type="file" name="member_image" class="form-control" />
<input type="hidden" name="member_image_hidden_file" value="{member_image}{file_name}{/member_image}" />
            <div class="input-group">
                <span class="input-group-btn">
                    <span class="btn btn-primary btn-file">Browse&hellip; 
                        <input type="file" name="member_image" id="member_image">
                    </span>
                </span>
                <input id="member_image_hidden_file" type="text" readonly name="member_image_hidden_file" class="form-control" value="{member_image}{file_name}{/member_image}">
            </div><!-- /input-group -->

            <button id="remove-img" type="button" class="close{if !member_image} hidden{/if}" aria-label="Close">
            <span aria-hidden="true">&times;</span></button>

            <span id="list">
            {if !member_image}Select a file to upload
            {if:else}
                {member_image}<label for="member_image"><img class="thumb img-responsive" src="{url}" title="{file_name}"></label>{/member_image}
            {/if}
            </span>
            <input type="hidden" name="member_image_directory" value="9">
        </div>
    </div>
--}


    <div class="form-group">
        <div class="col-sm-6">
            <label class="control-label" for="categories_1" >Services</label>
            <select name="category[]" id="categories_1" multiple class="form-control selectpicker">
            {categories show_group="2"}
              <option value="{category_id}"{selected}>{category_name}</option>
            {/categories}
            </select>
        </div>
        <div class="col-sm-6">
        {if "{embed:is_admin}"=="true"}
            <label class="control-label" for="categories_2">Region</label>
            <select name="category[]" id="categories_2" multiple class="form-control selectpicker">
            {categories show_group="3"}
              <option value="{category_id}"{selected}>{category_name}</option>
            {/categories}
            </select>
        {if:else}
            <label class="control-label">Region <span class="text-muted glyphicon glyphicon-lock"></span></label>
            <input type="text" value="{categories show_group='3' backspace='6'}{if selected}{category_name}, {/if}{/categories}" class="form-control input-lg" disabled>
        {!-- DANGER. only hidden by css! --}
            <select name="category[]" multiple="multiple" class="hidden">
            {categories show_group="3"}
            <option value="{category_id}"{selected}>{!--category_name--}</option>
            {/categories}
            </select>
        {/if}
        </div>
    </div>

    {if in_group_1_6}
    <hr>
    <div class="col-sm-8 col-sm-offset-2">
        <div class="well bg-danger">
            <h4>Admin Only <span class="fa fa-lock"></span></h4>
            <div class="form-group">
                <div class="col-sm-12">
                    <label class="control-label" for="categories_3" >Type</label>
                    <select name="category[]" id="categories_3" multiple
                     class="form-control selectpicker">
                    {categories show_group="1"}
                    <option value="{category_id}"{selected}>{category_name}</option>
                    {/categories}
                    </select>

{!-- ADDS RAC CATEGORY GROUP --}                    
                    <label class="control-label" for="categories_3b" >RAC</label>
                    <select name="category[]" id="categories_3b" class="form-control selectpicker">
                    {categories show_group="15"}
                    <option value="{category_id}"{selected}>{category_name}</option>
                    {/categories}
                    </select>


                </div>
            </div>
        </div>
    </div>
    {if:else}
        {!-- DANGER. only hidden by css! --}
        <select name="category[]" multiple="multiple" class="hidden">
        {categories show_group="1"}
        <option value="{category_id}"{selected}>{!--category_name--}</option>
        {/categories}
        </select>
    {/if}

    <div class="form-group">
        <div class="col-sm-9">
            <div id="success" class="alert alert-success alert-dismissible hidden" role="alert" data-hide="3000">
                <button type="button" class="close" data-dismiss="alert" aria-label="Close"><span aria-hidden="true">&times;</span></button>
                <strong>Success!</strong> This directory entry has been updated. <span class="glyphicon glyphicon-ok"></span>
            </div>
            <div id="error" class="alert alert-danger alert-dismissible hidden" role="alert" data-hide="3000">
                <button type="button" class="close" data-dismiss="alert" aria-label="Close"><span aria-hidden="true">&times;</span></button>
                <span class="message"></span>
            </div>
        </div>
        <div class="col-sm-3">
            <button type="submit" class="btn btn-lg btn-primary pull-right">Update</button>
        </div>
    </div>


{/exp:channel:form}

Anyone have any ideas on this?

Many thanks in advance :-)

Kind Regards

Karl

1

If you make a hidden field called transcribe__transcribe_language and set it to {transcribe:language_abbreviation}

Or you can try to add: transcribe="disable" to your channel form tag

| improve this answer | |
  • Hi Jelle, many thanks for the feedback on this. I did try the parameter transcribe="disable" in the channel form tag but this does not work. I've also tried adding the hidden field: '<input type="hidden" transcribe__transcribe_language="{transcribe:language_abbreviation}" value="1" />' but this didn't seem to work either. – Karl Bowers Sep 27 '19 at 16:12
  • Further update on this: I have tried this line and it's worked! <input type="hidden" name="transcribe__transcribe_language" value="{exp:transcribe:entries}{transcribe_entry_lang_id}{/exp:transcribe:entries}" /> – Karl Bowers Sep 27 '19 at 16:31
  • Many thanks once again for this, much appreciated :-) – Karl Bowers Sep 27 '19 at 16:41

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.