ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

safecracker problem

October 02, 2011 3:31pm

Subscribe [7]
  • #1 / Oct 02, 2011 3:31pm

    ahmedeng

    30 posts

    Hello,
    My EE version is 2.2.2.
    I have this form to edit some channel entry at frontend

    <?php
        ini_set("memory_limit","-1");
    ?>
    
    
    {exp:safecracker channel="apartment" include_jquery="yes" datepicker="yes" return="realestate/add_offered_rent_ad/URL_TITLE" url_title="{segment_3}" preserve_checkboxes="yes" require_entry="yes"}        
            
    
            <fieldset>
            <label for="extra_notes_apt" id="extra_notes_apt_lbl">وصف حر</label>
            <textarea id="extra_notes_apt" name="extra_notes_apt" dir="{text_direction}" rows="5">{extra_notes_apt}</textarea>
        </fieldset>        
            
         <fieldset>
             {custom_fields}
                {if file}
                    {display_field}
                {/if} 
    
            {/custom_fields} 
            </fieldset>
        
            <fieldset>
            <input type="submit" name="submit" value="Submit" />
            </fieldset>
    
        {/exp:safecracker}

    this form has some problem
    1-file manager problem:
      when i click “add file” the file manager dialog appear but the upload file button does work and the select drop down list of allowed upload directories has the all available directories in spite of i determined only one upload directory in custom field settings.

    2-when i logged in with user whom is not a super admin , the form does not appear at all.

    3-when i submitted the form the following error appear:
    A PHP Error was encountered

    Severity: Notice

    Message: Array to string conversion

    Filename: libraries/Functions.php

    Line Number: 1449

     

    thank you in advance

  • #2 / Oct 03, 2011 12:20am

    John Henry Donovan

    12339 posts

    Hi ahmedeng,

    2-when i logged in with user whom is not a super admin , the form does not appear at all.

    In your SafeCracker Module settings have you set the channel ‘apartment’ to allow guest submissions?
    When you set it as to accept guest submissions can you share a link to the form please?

    Can you remove the php you have in the template please.

    Is the SafeCracker form the only thing you have in your template presently?

     

     

  • #3 / Oct 03, 2011 8:09am

    ahmedeng

    30 posts

    Hello,

    The form link:  http://www.madinaty-online.net/en/index.php/realestate/edit_apt/g058-08-22

    I removed php code.

    The SafeCracker form is the only thing i have in my template presently.

  • #4 / Oct 04, 2011 6:51pm

    Dan Decker

    7338 posts

    Hi ahmedeng,

    Do you want guests to be able to post to this form? If so you’ll need to set the logged_out_member_id parameter. If you set that parameter, does the form display properly?

    Cheers,

  • #5 / Oct 05, 2011 3:33am

    ahmedeng

    30 posts

    Hello,

    I solved the second issue as john henry told me in his post, but i still have the first issue and third one and i submitted a form link as john request from me.

  • #6 / Oct 07, 2011 9:18am

    Sue Crocker

    26054 posts

    Hi, ahmedeng. When I visit that form link, I see a blank page. That tells me that you don’t allow guest postings yet.

    Here’s a setting that works for me in a channel I have named SafeCracker.

    I have a member called Editor that has access to the channel.

    Can you post your settings?

  • #7 / Oct 07, 2011 11:20am

    ahmedeng

    30 posts

    Hello Sue,

    I did as you said. and the form display now.but i still can not upload files and can not submit.

    When i submitted i got this error:
    You are not authorized to perform this action

    I used the user “rehaby” as a guest and the member group which that user belong to it, can post and edit to this channel.

  • #8 / Oct 08, 2011 10:34pm

    Dan Decker

    7338 posts

    Hi ahmedeng,

    In Content-> Files-> Fule Upload Preferences , does the user group the user is assigned to have permission to upload to that Upload Destination?

    Cheers,

  • #9 / Oct 09, 2011 5:55am

    ahmedeng

    30 posts

    Hello Dan,

    Yes he assigned to have permission to upload to that destination.

  • #10 / Oct 10, 2011 3:00pm

    Sue Crocker

    26054 posts

    Hi, ahmedeng.

    If you log in as this person in the back end, can you post a new entry in that particular channel?

  • #11 / Oct 10, 2011 6:51pm

    ahmedeng

    30 posts

    Hi,sue

    I don’t allow this user to use the control panel (back end).
    He has no permission to use the control panel.

  • #12 / Oct 11, 2011 11:05am

    Mark Bowen

    12637 posts

    Hi ahmedeng,

    Have you set up the correct permissions for that user to post to the apartment channel yet?

    You would want to go to Members > Member Groups > Edit Group (Name of group your rehaby user is a member of) > Channel Assignment

    Ensure that the Member Group has privileges to post to the apartment Channel here.

    Does that help at all?

    Thanks,

    Mark

  • #13 / Oct 11, 2011 5:14pm

    ahmedeng

    30 posts

    Hello mark,

    I used the user “rehaby” as a guest and the member group which that user belong to it, can post and edit to this channel.

  • #14 / Oct 12, 2011 7:49pm

    Lisa Wess

    20502 posts

    Hi, ahmendeng -

    This user isn’t in the built-in Guest group is he? I’m not sure from your post; but if so, please try from another member group that has posting permission.

  • #15 / Oct 12, 2011 9:34pm

    ahmedeng

    30 posts

    Hi, lisa

    No he is not in the built-in guest group. he is a member of “verfied members” group that i created by my self, and this group has the posting permission for this channel.

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases