bytesource Posted September 2, 2014 Share Posted September 2, 2014 Hi, After uploading the /site/ folder to my web host and importing the database, I realized that a single repeater was not output correctly. Instead of rendering the content, only the path to the repeater's template is shown, and this is the path on my local machine: /home/sovonex/Programs/rubystack-2.0.0-12/apps/processwire/htdocs/site/templates/repeater_services.php /home/sovonex/Programs/rubystack-2.0.0-12/apps/processwire/htdocs/site/templates/repeater_services.php /home/sovonex/Programs/rubystack-2.0.0-12/apps/processwire/htdocs/site/templates/repeater_services.php This is the code in question: home.php (page->advantages contains 3 items) <!-- ADVANTAGES BOXES - START --> <div class="row text-center"> <?php foreach ($page->advantages as $a): ?> <?php echo $a->render(); ?> <?php endforeach; ?> </div> <!-- ADVANTAGES BOXES - END --> repeater_services.php <div class="col-md-4 col"> <div class="icon-border bm10"> <i class="<?= $page->icon ?>"></i> </div> <h5 class="upper colored"><?= $page->subject ?></h5> <?= $page->summary ?> </div> The strange thing is that there is a second repeater on the same page using nearly exactly the same code, and this one is output correctly. I already emptied the cache, sessions, and ProCache folders, but that did not the trick, either. This is the site in questions: http://staging.sovonex.com The section "WHAT WE PROVIDE" is rendered correctly by a similar repeater, the section "YOUR ADVANTAGES" below is the result of the repeater I am having problems with. It would be great if someone could give me a hint as to where the error is. Cheers, Stefan 1 Link to comment Share on other sites More sharing options...
reems Posted September 2, 2014 Share Posted September 2, 2014 First of all I see that you haven't named your repeater template repeater_[fieldname]. But something different that could cause the problem is using the php short tag "<?=". Big chance that in php on the server short tags are turned off. You could try by changing it to normal php "<?php echo" and see what happens. In your home.php you don't use the short tag and so maybe, with your other repeater template it's the same, reason why that one works fine. 3 Link to comment Share on other sites More sharing options...
bytesource Posted September 2, 2014 Author Share Posted September 2, 2014 @reems Thanks to your suggestions I solved the puzzle! Your mentioning that I was not using repeater_[fieldname] made me recall that I was using a symlink on this template. Turns out symlinks are not followed/not allowed on my web host, Hosteurope. So after copying the code from the destination of the symlink into the original file, everything was working again. Thanks again for your help! Cheers, Stefan 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