list of my entries, link to edit them gives my blank
Posted: 19 January 2011 02:08 AM   [ Ignore ]
Wallflower
Rank
Total Posts:  15
Joined  2011-01-16

Hi I have used filecracker to add data with success the page to add data is called edit and it’s inside the template_group epiplo_main
I have set return to go here

return="{path=epiplo_main/list}" 

a page with a list of the user entries

now I want to edit the entry and I use this

{exp:channel:entries author_id="{segment_3}" dynamic="no" limit="15" paginate="bottom"}


                    
<li><span style="float: right;"><small>{entry_date format="%F %j, %Y at %g:%i %a"}</small></span><a href="{path=epiplo_main/edit/{entry_id}}">{title}</a></li>
                    
{if no_results}<li>This user has not posted any entries.</li>{/if}
                    {paginate}
<li>Page {current_page} of {total_pages} page{if total_pages "1"}s{/if} &nbsp; &nbsp; &nbsp{pagination_links}</li>{/paginate}

{
/exp:channel:entries} 

It goes where it has to go edit/entry_id but all fields are blank instead of having data

any help with this?

Profile
 
 
Posted: 19 January 2011 02:12 AM   [ Ignore ]   [ # 1 ]
Teen Scream
Avatar
RankRankRank
Total Posts:  3541
Joined  2009-05-29

Can you show us your edit template, please? smile

Profile
 
 
Posted: 19 January 2011 02:28 AM   [ Ignore ]   [ # 2 ]
Wallflower
Rank
Total Posts:  15
Joined  2011-01-16

here it is

  {if logged_in}
     
        {exp:safecracker channel="products" return="{path=epiplo_main/list}”}
        <link href=”{path=css/_ee_saef_css}” type=“text/css” rel=“stylesheet” media=“screen” />
        {exp:jquery:script_tag}
         
          <label for=“title”>Î?νομα</label>
          <input type=“text” name=“title” id=“title” value=”{title}” size=“50” maxlength=“100”></br>

          <label for=“url_title”>URL Title</label>
          <input type=“text” name=“url_title” id=“url_title” value=”{url_title}” maxlength=“75” size=“50” /></br>
         
          <label for=“gallery”>Gallery</label></br>
          {field:gallery}</br>
         
          <label for=“description”>description</label></br>
          {field:description}</br>
         
          <label for=“rooms”>ΣÏ?νθέÏ?ειÏ? δÏ?μαÏ?ίοÏ?</label></br>
          {field:rooms}</br>
         
          <label for=“best_seller”>best_seller</label></br>
          {field:best_seller}</br>
         
          <label for=“related_products”>related products</label></br>
          {field:related_products}</br>
         
          <label for=“length”>μήκοÏ?</label>
          <input type=“text” name=“length” id=“length” value=”{length}” maxlength=“75” size=“50” /></br>
         
          <label for=“width”>Ï?λάÏ?οÏ?</label>
          <input type=“text” name=“width” id=“width” value=”{width}” maxlength=“75” size=“50” /></br>
         
          <label for=“height”>ύÏ?οÏ?</label>
          <input type=“text” name=“height” id=“height” value=”{height}” maxlength=“75” size=“50” /></br> 
         
          <label for=“width”>ΣÏ?Ï?λ</label>
          <select name=“style” id=“style”>
              {options:style}
                <option value=”{option_value}”{selected}>{option_name}</option>
              {/options:style}
          </select></br>
         
          <select name=“material” id=“material”>
              {options:material}
                <option value=”{option_value}”{selected}>{option_name}</option>
              {/options:material}
          </select></br>
         
          <select name=“color” id=“color”>
              {options:color}
                <option value=”{option_value}”{selected}>{option_name}</option>
              {/options:color}
          </select></br>
         
          <select name=“available” id=“available”>
              {options:available}
                <option value=”{option_value}”{selected}>{option_name}</option>
              {/options:available}
          </select></br>
         
          <label for=“code”>code</label>
          <input type=“text” name=“code” id=“code” value=”{code}” maxlength=“75” size=“50” /></br>
         
          <label for=“start_price”>start_price</label>
          <input type=“start_price” name=“start_price” id=“start_price” value=”{start_price}” maxlength=“75” size=“50” /></br>
         
          <label for=“end_price”>end_price</label>
          <input type=“text” name=“end_price” id=“end_price” value=”{end_price}” maxlength=“75” size=“50” /></br>
         

Custom Fields

         

          {category_menu}
              <label for=“categories”>Categories</label>
              <select name=“category[products]” id=“categories”>
                {select_options}
              </select>
          {/category_menu}</br>
         
         
         
          <input type=“submit” name=“submit” value=“Submit” /> 
        {/exp:safecracker}
      </div>
     
{/if}

Profile
 
 
Posted: 19 January 2011 02:29 AM   [ Ignore ]   [ # 3 ]
Teen Scream
Avatar
RankRankRank
Total Posts:  3541
Joined  2009-05-29

You should add this to your safecracker.

entry_id="{segment_3}" 
Profile
 
 
Posted: 19 January 2011 02:44 AM   [ Ignore ]   [ # 4 ]
Wallflower
Rank
Total Posts:  15
Joined  2011-01-16

thanks alot for your help!

[ Edited: 19 January 2011 03:00 AM by amra01 ]
Profile
 
 
Posted: 20 January 2011 03:25 AM   [ Ignore ]   [ # 5 ]
Wallflower
Rank
Total Posts:  15
Joined  2011-01-16

I have 2 pages one is edit I use to edit and add new entries the other is list to show to the user his entries if when I am adding a new content everything is fine but when I go to list and then editing an entry I have these errors

as an admin I get these errors

A PHP Error was encountered

Severity
Notice

Message
: Array to string conversion

Filename
libraries/Functions.php

Line Number
1429

A PHP Error was encountered

Severity
Warning

Message
Cannot modify header information headers already sent by (output started at /Applications/MAMP/htdocs/ee213_epiplo/system/codeigniter/system/core/Exceptions.php:170)

Filenamelibraries/Functions.php

Line Number
387 

as a user it gets me here

http://localhost/ee213_epiplo/index.php/ee213_epiplo/index.php/epiplo_main/list 

instead of here

http://localhost/ee213_epiplo/index.php/epiplo_main/list 

in both ways it edits the entry correct

here is the code for the links
edit page

{exp:safecracker channel="products" return="{path=epiplo_main/list}" entry_id="{segment_3}"

and link for list page back to edit page

<a href="{path=epiplo_main/edit/{entry_id}}">{title}</a

any suggestions?

Profile
 
 
Posted: 20 January 2011 03:30 AM   [ Ignore ]   [ # 6 ]
Teen Scream
Avatar
RankRankRank
Total Posts:  3541
Joined  2009-05-29

Your return path should not have the {path=} variable, it should just be epiplo_main/list, let’s start there.

{exp:safecracker channel="products" return="epiplo_main/list" entry_id="{segment_3}"
Profile
 
 
Posted: 20 January 2011 03:38 AM   [ Ignore ]   [ # 7 ]
Wallflower
Rank
Total Posts:  15
Joined  2011-01-16

I changed it works better now but I still get some errors
what is the difference between {path=admin} and admin/

ok everything seems fine for the user now add and edits with no problem as for the admin I don’t mind so much cause I can edit from the main admin area.
thanks alot for your help.

[ Edited: 20 January 2011 03:58 AM by amra01 ]
Profile