Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

Blog Module

Discuss the Blog Module.

Moderators: martimiz, Sean, biapar, Willr, Ingo, swaiba, simon_w

Mysterious case of the undead BlogSummary.ss


Reply

6 Posts   1505 Views

Avatar
InvaderZim

30 September 2010 at 3:59am (Last edited: 30 September 2010 4:00am), Community Member, 2 Posts

I have encountered a most bizarre problem. I was translating the blog module, and when i was done modifying one of the existing i18n packages I realized that not everything within the blog module (at least not in the v0.4.0 that I am using) can be translated with a i18n package. For example "Read the full post" was hardcoded in the BlogSummary.ss template:

<a href="$Link" class="readmore" title="Read Full Post">Read the full post</a>

Naturally, it would be strange to have that part of the Blog untranslated so I have edited the template. And to my utter surprise nothing has changed on my website. Not even after /?flush=1. Not even after /dev/build?flush=1. Not even after restarting the computer I am using as a server for developing this website. Of course I have checked whether some other BlogSummary.ss was being loaded, from /themes or similar, but there are no other BlogSummary.ss except the one that came with the blog module. As a matter of fact "Read full post" string (as well as "Read the full post") that is displayed on my website (and it is text, not an image) now that I have replaced it with my translation does not exist in any of the files in the entire Silverstripe instalation - I've searched the whole directory.

Is there any other explanation except that I have gone insane?

Avatar
Willr

30 September 2010 at 8:24pm Forum Moderator, 5511 Posts

Are you sure you are editing the correct file (and the correct project?). Delete the whole file and run a ?flush=all.

Also check you're not using a hard cache by having this in your _config (at least just for testing)

SS_Cache::set_cache_lifetime('any', '-1');

Then reload the page again with a ?flush=all, if that still doesn't fix it I would think you're using the wrong file.

Avatar
InvaderZim

30 September 2010 at 11:59pm Community Member, 2 Posts

I was editing the correct file, but I did not flushed it correctly. ?flush=all solved my problem. I thought that ?flush=1 reloads all templates (flush=all was not mentioned in tutorials, and I have just started using SilverStripe) so since I was flushing from home page which is not a blog holder page, blog related templates were not flushed.
Thanks a lot, If I have not solved this problem, I would probably gave up on SilverStripe.

Avatar
steveforest

27 May 2011 at 12:41am Community Member, 8 Posts

I'm encountering the same problem on my first SS website but /dev/build/?flush=all doesn't solve my problem...

I edited /blog/templates/Includes/BlogSummary.ss to change hardcoded text and ran a /dev/build/?flush=all, but nothing changed. I have tried to override that file by putting a copy in my templates/Includes folder but that doesn't work either.

BlogSummary.ss line 13

   <p class="blogVitals"><a href="$Link#PageComments_holder" class="comments" title="View Comments for this post">$Comments.Count commentaires</a> | <a href="$Link" class="readmore" title="Read Full Post">Lire la suite...</a></p>

Avatar
steveforest

27 May 2011 at 2:02pm (Last edited: 27 May 2011 2:03pm), Community Member, 8 Posts

If someone can help, that would me much appreciated... I have to put that site up quickly and if I can't find a solution soon, I'll have to stick with Joomla... and there are several features from SS I will miss... ;)

If it can helps, the URL of my dev site is : http://dev.steveforest.com/

Avatar
steveforest

27 May 2011 at 2:29pm Community Member, 8 Posts

I found the solution randomly... In BlogHolder.ss (in my template folder), if I cut <% include BlogSummary %>, save, paste and save again... changes I did on BlogSummary.ss are there!