[SOLVED] Issues with News Module after upgrading to 1.11.1

Have a question or a suggestion about a 3rd party addon module or plugin?
Let us know here.
Post Reply
henchenm
Forum Members
Forum Members
Posts: 40
Joined: Wed Jun 17, 2009 5:19 pm

[SOLVED] Issues with News Module after upgrading to 1.11.1

Post 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]
Last edited by henchenm on Sun Sep 16, 2012 2:06 pm, edited 2 times in total.
applejack
Power Poster
Power Poster
Posts: 1014
Joined: Fri Mar 30, 2007 2:28 am
Location: London

Re: Major Issues with News Module after upgrading to 1.11.1

Post by applejack »

Use $entry->fieldsbyname.featured
henchenm
Forum Members
Forum Members
Posts: 40
Joined: Wed Jun 17, 2009 5:19 pm

Re: Major Issues with News Module after upgrading to 1.11.1

Post 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...

Code: Select all

src="uploads/news/id$post/$img"
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
applejack
Power Poster
Power Poster
Posts: 1014
Joined: Fri Mar 30, 2007 2:28 am
Location: London

Re: Major Issues with News Module after upgrading to 1.11.1

Post by applejack »

Sorry forget the ->value i.e. $entry->fieldsbyname.featured->value
henchenm
Forum Members
Forum Members
Posts: 40
Joined: Wed Jun 17, 2009 5:19 pm

Re: Major Issues with News Module after upgrading to 1.11.1

Post 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...
User avatar
pixelita
Power Poster
Power Poster
Posts: 388
Joined: Sun Sep 16, 2007 3:07 am
Location: Houston, Texas USA

Re: [SOLVED] Issues with News Module after upgrading to 1.11

Post 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!
Submit your site to the We Love CMSMS showcase
User avatar
pixelita
Power Poster
Power Poster
Posts: 388
Joined: Sun Sep 16, 2007 3:07 am
Location: Houston, Texas USA

Re: [SOLVED] Issues with News Module after upgrading to 1.11

Post 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. :(
Submit your site to the We Love CMSMS showcase
User avatar
pixelita
Power Poster
Power Poster
Posts: 388
Joined: Sun Sep 16, 2007 3:07 am
Location: Houston, Texas USA

Re: [SOLVED] Issues with News Module after upgrading to 1.11

Post 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.
Submit your site to the We Love CMSMS showcase
applejack
Power Poster
Power Poster
Posts: 1014
Joined: Fri Mar 30, 2007 2:28 am
Location: London

Re: [SOLVED] Issues with News Module after upgrading to 1.11

Post by applejack »

Post the code so I can take a look.
User avatar
pixelita
Power Poster
Power Poster
Posts: 388
Joined: Sun Sep 16, 2007 3:07 am
Location: Houston, Texas USA

Re: [SOLVED] Issues with News Module after upgrading to 1.11

Post 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
Submit your site to the We Love CMSMS showcase
calguy1000
Support Guru
Support Guru
Posts: 8169
Joined: Tue Oct 19, 2004 6:44 pm
Location: Fernie British Columbia, Canada

Re: [SOLVED] Issues with News Module after upgrading to 1.11

Post 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.
Follow me on twitter
Please post system information from "Extensions >> System Information" (there is a bbcode option) on all posts asking for assistance.
--------------------
If you can't bother explaining your problem well, you shouldn't expect much in the way of assistance.
Post Reply

Return to “Modules/Add-Ons”