Marty Walker Posted May 28, 2012 Share Posted May 28, 2012 Hi, I have a page template that has a repeater fieldtype (with two fields in it). For some reason (that I can't see) those repeater fields only display when I'm logged in as the admin and not as a guest. I don't have any access restrictions on the template and any other fields show up. I'm using the latest 2.2.2. Regards Marty Link to comment Share on other sites More sharing options...
diogo Posted May 28, 2012 Share Posted May 28, 2012 can you paste the code your using to call the fields? sounds like you are calling the hidden repeater field pages directly instead of the fields themtself. Link to comment Share on other sites More sharing options...
Marty Walker Posted May 28, 2012 Author Share Posted May 28, 2012 Sure. But they definitely display correctly when I view the page as an admin. <?php foreach($page->videos as $videoitem) { echo "<dt><a href=''>{$videoitem->title}</a></dt>"; echo "<dd><iframe width='{$vidx}' height='{$vidy}' src='https://www.youtube.com/embed/{$videoitem->video_link}?rel=0' frameborder='0' allowfullscreen></iframe></dd>"; } Regards Marty Link to comment Share on other sites More sharing options...
diogo Posted May 28, 2012 Share Posted May 28, 2012 Definitely not what I thought. You are outputting them correctly, but I can't reproduce your error with the same code in my testing environment. Are you using last version of PW? Link to comment Share on other sites More sharing options...
Marty Walker Posted May 28, 2012 Author Share Posted May 28, 2012 Yes it's a brand new install from two days ago. I might update it and see what happens. Link to comment Share on other sites More sharing options...
Marty Walker Posted May 28, 2012 Author Share Posted May 28, 2012 Well I updated the install and I still get the same issue. I can see all the content when logged in but not when logged out. Here's a screen of the permissions for the page template. There's nothing bizarre in my template code that restricts any views. I really do not know why it's doing it. Link to comment Share on other sites More sharing options...
Marty Walker Posted May 28, 2012 Author Share Posted May 28, 2012 I think I know what it might be. When I originally added my new template I asked PW to duplicate fields from another template. Just then I created a new template and added the fields manually and it all works now. Regards Marty Link to comment Share on other sites More sharing options...
diogo Posted May 28, 2012 Share Posted May 28, 2012 can you create a new template with this repeater field to see it it works there? Link to comment Share on other sites More sharing options...
Marty Walker Posted May 28, 2012 Author Share Posted May 28, 2012 I think I have it sorted and I still think it's a bug but I'll experiment some more later. Thanks for your help diogo! Link to comment Share on other sites More sharing options...
diogo Posted May 28, 2012 Share Posted May 28, 2012 Ok, so lets wait for Ryan to see this edit: I think I know what it might be. When I originally added my new template I asked PW to duplicate fields from another template. I only saw this answer now. Ya, must be a bug. Link to comment Share on other sites More sharing options...
ryan Posted May 29, 2012 Share Posted May 29, 2012 So far I'm confused on this one. When you import fields, it's not getting involved in anything with access control. Repeater pages are also inaccessible to guest either way. They are only accessible via the page they originate from. What you describe sounds like a bug in there somewhere, but so far I can't consciously connect the result with the identified cause. I'll experiment. If anyone else experiences a similar result please let me know. Link to comment Share on other sites More sharing options...
tinacious Posted May 30, 2012 Share Posted May 30, 2012 I'm also having a similar issue. When I create and preview the page, it shows up great. When I publish it, it doesn't show up. I'm also using repeater fields. There must be a bug with it or something. Here is my code: <?php $counter = 1; foreach($page->step as $item) { $step_title = $item->single_line_text; $step_desc = $item->message; echo '<div class="hire-number"><p>' . $counter . '</p></div><div class="hire-main">'; echo '<h2>' . $step_title . '</h2> <p>' . $step_desc . '</p></div>'; $counter++; } ?> I will try creating a new template using the fields and see how it goes. Link to comment Share on other sites More sharing options...
tinacious Posted May 30, 2012 Share Posted May 30, 2012 Ok so I re-created the page using the template. It seems as though this bug—where the repeater fields do not appear upon publish (but show perfectly in preview)—happens if you modify the template while you're creating the page. Once the template has been created, you can create a page and it'll be good to go. Recreating the page is a work-around to this until it is fixed. Link to comment Share on other sites More sharing options...
tinacious Posted May 30, 2012 Share Posted May 30, 2012 There is a bug with the repeater fields. You can't create more than a certain amount, and if you do you need to publish the page because if you save without publishing, those fields will be marked unpublished and there's no way to publish just one of the repeater fields in that group. Weird. Link to comment Share on other sites More sharing options...
tinacious Posted May 30, 2012 Share Posted May 30, 2012 To fix this after the fact I just deleted those unpublished fields and re-added them. So basically: do not "Save without Publishing" on repeater fields otherwise you won't be able to publish those fields. Link to comment Share on other sites More sharing options...
diogo Posted May 31, 2012 Share Posted May 31, 2012 here is a bug with the repeater fields. You can't create more than a certain amount, and if you do you need to publish the page because if you save without publishing, those fields will be marked unpublished and there's no way to publish just one of the repeater fields in that group. Weird. I can confirm this. Just reproduced it. All the repeater fields that were created while the page was "saved + kept unpublished" stopped being outputted to the page after i finally published it, although they still appear in the admin side. Link to comment Share on other sites More sharing options...
ryan Posted May 31, 2012 Share Posted May 31, 2012 Thanks for testing this guys. I was able to reproduce it, though only on non-ready repeater pages (i.e. those that say "this will become editable after you save"). I've committed a fix to the source. I was wondering if you could grab it and let me know if it also resolves the issue on your end? Thanks, Ryan Link to comment Share on other sites More sharing options...
diogo Posted May 31, 2012 Share Posted May 31, 2012 It seems to work now. The "Hero" word above your photo suits you well Link to comment Share on other sites More sharing options...
ryan Posted May 31, 2012 Share Posted May 31, 2012 Great! Thanks for testing Diogo. Link to comment Share on other sites More sharing options...
AnotherAndrew Posted June 9, 2012 Share Posted June 9, 2012 I am experiencing this bug too. I downloaded the latest commit, but I am still seeing unpublished on certain items. Do I need to re-enter the information (grrr) or is there a way to have it pushed to published? Link to comment Share on other sites More sharing options...
WillyC Posted June 9, 2012 Share Posted June 9, 2012 heyu.make small changeto item like.add periodto sentance then.say misjgoth in.english and cluck save, fixed 1 Link to comment Share on other sites More sharing options...
AnotherAndrew Posted June 9, 2012 Share Posted June 9, 2012 WillyC, you the man. That worked like a charm. I forgot to say "misjgoth" but it still worked! 1 Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now