1

I'm using Profile:Edit for a site running EE 2.5.5. Logged in as Super Admin when I try to edit the account/profile info I get the following error:

The form you submitted contained the following errors

- Invalid member

Return to Previous Page

Here's my code:

{exp:profile:edit return="members"}
                    <fieldset>
                        <p class="profile-row">
                            <strong>Username</strong> <span><input type="text" name="username" value="{username}" /></span>
                        </p>

                        <p class="profile-row">
                            <strong>Email</strong> <span><input type="text" name="email" value="{email}" /></span>
                        </p>
                    </fieldset>

                    <fieldset>
                        <p><strong>Note:</strong> Leave blank if you do not wish to change your password.</p>

                        <p class="profile-row">
                            <strong>New Password</strong> <span><input type="password" name="password" value="" /></span>
                        </p>

                        <p class="profile-row">
                            <strong>Confirm New Password</strong> <span><input type="password" name="password_confirm" value="" /></span>
                        </p>

                        {!-- superadmins don't have to submit existing password --}
                        {if logged_in_group_id != 1}
                            <p class="profile-row">
                                <strong>Your Existing Password<br /><em>(You must submit the current password to update this page)</em></strong> <span><input type="password" name="current_password" value="" /></span>
                            </p>
                        {/if}
                    </fieldset>

                    <fieldset>
                        {custom_fields}
                            <p class="profile-row">
                                <strong><label for="{field_name}">{field_label} {if required}*{/if}</label></strong>

                                {!-- {field_instructions}

                                {formatting_buttons} --}
                                <span>
                                    {if textarea}<textarea id="{field_name}" name="{field_name}" dir="{text_direction}" rows="{rows}">{field_data}</textarea>{/if}

                                    {if text}<input type="text" dir="{text_direction}" id="{field_name}" name="{field_name}" value="{field_data}" maxlength="{maxlength}" />{/if}

                                    {if select}
                                        <select id="{field_name}" name="{field_name}">
                                        {options}<option value="{option_value}"{selected}>{option_name}</option>{/options}
                                        </select>
                                    {/if}

                                    {if date}<input type="text" id="{field_name}" name="{field_name}" value="{field_data}" />{/if}

                                    {if checkbox}
                                        {options}<label class="checkbox">{option_value} <input type="checkbox" id="{field_name}" name="{field_name}[]" value="{option_value}"{checked} /></label>{/options}
                                    {/if}

                                    {if radio}
                                        {options}<label class="checkbox">{option_value}<label class="checkbox"> <input type="radio" id="{field_name}" name="{field_name}" value="{option_value}"{checked} /></label>{/options}
                                    {/if}

                                    {if file}{display_field}{/if}

                                    {if relationship}
                                        <select id="{field_name}" name="{field_name}">
                                        {options}<option value="{option_value}"{selected}>{option_name}</option>{/options}
                                        </select>
                                    {/if}

                                    {if multiselect}
                                        <select id="{field_name}" name="{field_name}[]" multiple="multiple">
                                        {options}<option value="{option_value}"{selected}>{option_name}</option>{/options}
                                        </select>
                                    {/if}
                                </span>
                            </p>
                        {/custom_fields}
                    </fieldset>

                    <fieldset>
                        <input type="submit" value="Save" />
                    </fieldset>
                {/exp:profile:edit}

Has anyone seen this or know how to troubleshoot & fix? Is the member ID or entry ID needed in the URL (currently not there as the docs say it's not necessary)?

(If I edit in the back-end via the member channel entry, it works fine.)

1

So after poking through the module's code I was able to narrow it down to being a DB issue. For whatever reason, there was no row for the member in the exp_member_data table. I have no idea why it wasn't there, but adding it in did the trick (super simple since that table has only one column).

If anyone has any idea why the member ID wouldn't be in that table, I'd love to hear it. Thanks!

| improve this answer | |
  • I'm experiencing this same problem, and I don't fully understand your answer, could you clarify? My exp_member_data table has many, many, many columns, and it does appear that some rows have gone missing. I'm quite keen on figuring out why this happened as well, to prevent it happening again. Do you use DataGrab? I used that rather extensively and wonder if that might have had something to do with it? – dotlizard Feb 19 '13 at 16:55
  • I've used DataGrab, yes, but not for this particular site/issue. If you're comfortable going into the database (either via phpMyAdmin or an app like Sequel Pro), it's really simply to just add the missing member ID to the exp_member_data table. – Angie Herrera Feb 20 '13 at 1:22
0

If you are logged in as Super Admin, but are editing a different profile, I believe you will need that entry_id. Have you tried adding it and seeing if it works? Otherwise it's pulling it via the logged_in_member_id I think, IIRC.

| improve this answer | |
0

I believe I ran into something similar before. Here's a few things I would try. Since Profile:Edit utilizes SafeCracker, I would try setting these parameters.

In the SafeCracker documentation it says the channel parameter is required. http://ellislab.com/expressionengine/user-guide/modules/safecracker/index.html#channel

channel="[your_profile_edit_channel_name]"

I remember setting author_only to "yes" did the trick.

author_only="yes"

| improve this answer | |

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.