Page 1 of 1
[SOLVED] Issues with News Module after upgrading to 1.11.1
Posted: Sat Sep 15, 2012 5:49 pm
by henchenm
Greetings. After upgrading to 1.11.1 my news summary page would no longer show up the way it did before the upgrade.
The featured image I have set, no longer shows up and when I try to embed a gallery into a news post it breaks the site completely.
This is my news summary template. I'm assuming there is some new syntax I need to use, but I know very little about smarty or php. If anyone could help me get this working it again, it would be greatly appreciated....
Code: Select all
[code]<div class="newswrapper">
{foreach from=$items item=entry}
{assign var=post value=$entry->id}
{assign var=img value=$entry->featured}
{if $entry->featured}
<div class="NewsSummary">
<h4><a href="{$entry->moreurl}" title="{$entry->title|cms_escape:htmlall}">{$entry->title|cms_escape:htmlall}</a></h4>
<span class="imageThumb">{supersizer path="uploads/news/id$post/$img" width=80 alt=$entry->title|cms_escape:htmlall}</span>
{eval var=$entry->content|truncate:200:"...":true|strip_tags}<p>
<a class="button blue" href="{$entry->moreurl}" title="{$entry->title|cms_escape:htmlall}">Read more</a></p>
{else}
<div class="NewsSummary">
<h4><a href="{$entry->moreurl}" title="{$entry->title|cms_escape:htmlall}">{$entry->title|cms_escape:htmlall}</a></h4>
{eval var=$entry->content|truncate:200:"...":true|strip_tags}
<p>
<a class="button blue" href="{$entry->moreurl}" title="{$entry->title|cms_escape:htmlall}">Read more</a></p>
{/if}
</div>
{/foreach}
<div class="NewsMore">
<p>
<a class="button blue1" href="/news" >Want More News?</a>
</div>
</div>
[/code]
Re: Major Issues with News Module after upgrading to 1.11.1
Posted: Sun Sep 16, 2012 12:12 am
by applejack
Use $entry->fieldsbyname.featured
Re: Major Issues with News Module after upgrading to 1.11.1
Posted: Sun Sep 16, 2012 12:31 pm
by henchenm
That seemed to help the issue. It is recognizing if the post has a 'featured' image, but it doesn't seem to be finding the post's 'featured' image.
The following code does not seem to be working...
It will call everything fine, except the $img part. For that it pulls the title of the post, not the image file.
Any ideas?
Thanks
Re: Major Issues with News Module after upgrading to 1.11.1
Posted: Sun Sep 16, 2012 12:38 pm
by applejack
Sorry forget the ->value i.e. $entry->fieldsbyname.featured->value
Re: Major Issues with News Module after upgrading to 1.11.1
Posted: Sun Sep 16, 2012 2:04 pm
by henchenm
YES! That fixed it. Thank you SO much. I can't tell you how many hours I spent trying to get that to work.
Thanks again...
Re: [SOLVED] Issues with News Module after upgrading to 1.11
Posted: Sun Oct 07, 2012 5:34 pm
by pixelita
Use $entry->fieldsbyname.featured
i'm not clear on these instructions. Is the above code to be SUBSTITUTED for something else or???
Here is the summary template code that used to work but now does not. The image, while THERE, and called properly -- the URL is correct for the image file on the server -- does NOT show up in the post. Custom fields are newsimage and newsthumb, BTW.
Code: Select all
<!-- NEWS.FRONT.PAGE.SUMMARY -->
{foreach from=$items item=entry}
<div class="NewsSummary">
<div class="newsthumb">
<img src="/uploads/news/id{$entry->id}/{$entry->newsthumb}" alt="{$entry->title}" width="111" />
</div>
<div class="news_summ_right">
<h2 class="NewsSummaryLink"><a href="{$entry->moreurl}" title="{$entry->title}">{$entry->title}</a></h2>
{if $entry->postdate}
<p class="NewsSummaryPostdate">{$entry->postdate|cms_date_format:"%B %e, %Y"}</p>
{/if}
{if $entry->summary}
<p class="NewsSummarySummary">{eval var=$entry->summary}</p>
{else if $entry->content}
<div class="NewsSummaryContent">
{eval var=$entry->content}
</div>
{/if}
</div><!-- /news_summ_right -->
<div class="clearer"></div>
</div><!-- /NewsSummary -->
{/foreach}
Also, links to any news item throws out a 404 error. All b/c I upgraded last night. I saw a note about this in the forge as a bug report, but it only pertained to news items with an expiration date. My news items DO NOT have an expiration date and mod_rewrite/pretty URLS is on. And as mentioned, this exact template works just fine here:
http://idylwood.org ... Go figure!
The site is here:
http://honfish.mytestbed.com ... it's the news summary at the lower right. Credentials to access this protected page are client/letmein.
Thanks!
Re: [SOLVED] Issues with News Module after upgrading to 1.11
Posted: Sun Oct 07, 2012 5:42 pm
by pixelita
I tried substituting this:
<img src="/uploads/news/id{$entry->id}/
{$entry->fieldsbyname.newsthumb}" alt="{$entry->title}" width="111" />
in the template and it broke the site.

Re: [SOLVED] Issues with News Module after upgrading to 1.11
Posted: Sun Oct 07, 2012 8:44 pm
by pixelita
I solved the images not loading issue, but the 404 error page on the news detail page still remains.
I have seen this:
Troubleshooting information database
Error message
Opening a news detail- or categorypage ends up in a error 404 - page doesn't exist.
Solution
When using the detailpage parameter in the news tag, it could be the set detailpage is switched inactive in the listcontent. Or perhaps renamed or removed.
Related categories: - module - frontend - news module
But this does not apply to me since the detailpage IS active in the listcontent. I've tried checking and unchecking about expired news items being searchable or viewable on the detail page.
Is there an .htaccess setting that needs to be adjusted maybe?
This is very frustrating to me and a huge reason I am always so reluctant to upgrade.
Re: [SOLVED] Issues with News Module after upgrading to 1.11
Posted: Sun Oct 07, 2012 11:10 pm
by applejack
Post the code so I can take a look.
Re: [SOLVED] Issues with News Module after upgrading to 1.11
Posted: Sun Oct 07, 2012 11:14 pm
by pixelita
Hi. I just moved this to a new thread and was coming back here to delete these when I saw your reply.
New thread is here:
http://forum.cmsmadesimple.org/viewtopi ... =7&t=63370
Re: [SOLVED] Issues with News Module after upgrading to 1.11
Posted: Mon Oct 08, 2012 6:37 am
by calguy1000
a: Have you tried checking the preference in the News Module settings to allow displaying expired articles in the detail view?
b: Your .htaccess is setup incorrectly wrt your config.php
Your page_extension is empty in the config.php
yet your .htaccess is telling the system to append a / to the end of the URLS.