[Solved] News Module Stopped Working

For questions and problems with the CMS core. This board is NOT for any 3rd party modules, addons, PHP scripts or anything NOT distributed with the CMS made simple package itself.
Post Reply
tina29
New Member
New Member
Posts: 6
Joined: Mon Nov 03, 2008 10:53 pm

[Solved] News Module Stopped Working

Post by tina29 »

Hi there,

Recently installed CMS made simple, and have been modifiying the look and feel of the site. Now, the news module is not working. When I click on links, they are like the examples below, but do not actually load a page:

http://www.psychlosport.co.uk/index.php ... eturnid=39

I re-installed the newsmodule, and still have the same problem. Has anyone else experienced this, is it fixable?

Thanks

Tina
Last edited by tina29 on Mon Nov 03, 2008 11:37 pm, edited 1 time in total.
User avatar
Nullig
Power Poster
Power Poster
Posts: 2380
Joined: Fri Feb 02, 2007 4:31 pm

Re: News Module Stopped Working

Post by Nullig »

Please post the news tag from your page template, so we can see what parameters you're sending and also post your news detail template.

Nullig
tina29
New Member
New Member
Posts: 6
Joined: Mon Nov 03, 2008 10:53 pm

Re: News Module Stopped Working

Post by tina29 »

Hi Nullig,

My news summary template is as follows:

Code: Select all

<!-- Start News Display Template -->
{if $pagecount > 1}
  <p>
{if $pagenumber > 1}
{$firstpage} {$prevpage} 
{/if}
{$pagetext} {$pagenumber} {$oftext} {$pagecount}
{if $pagenumber < $pagecount}
 {$nextpage} {$lastpage}
{/if}
</p>
{/if}
{foreach from=$items item=entry}
<div class="NewsSummary">

{if $entry->formatpostdate}
	<div class="NewsSummaryPostdate">
		{$entry->formatpostdate}
	</div>
{/if}

<div class="NewsSummaryLink">
	{$entry->titlelink}
</div>

<div class="NewsSummaryCategory">
	{$category_label} {$entry->category}
</div>

{if $entry->author}
	<div class="NewsSummaryAuthor">
		{$author_label} {$entry->author}
	</div>
{/if}

{if $entry->summary}
	<div class="NewsSummarySummary">
		{eval var=$entry->summary}
	</div>

	<div class="NewsSummaryMorelink">
		[{$entry->morelink}]
	</div>

{else if $entry->content}

	<div class="NewsSummaryContent">
		{eval var=$entry->content}
	</div>
{/if}

{if isset($entry->extra)}
    <div class="NewsSummaryExtra">
        {eval var=$entry->extra}
	{* {cms_module module='Uploads' mode='simpleurl' upload_id=$entry->extravalue} *}
    </div>
{/if}
{if isset($entry->fields)}
  {foreach from=$entry->fields item='field'}
     <div class="NewsSummaryField">
        {if $field->type == 'file'}
          <img src="{$entry->file_location}/{$field->value}"/>
        {else}
          {$field->name}: {eval var=$field->value}
        {/if}
     </div>
  {/foreach}
{/if}

</div>
{/foreach}
<!-- End News Display Template -->
My detail template is:

Code: Select all

{if $entry->formatpostdate}
	<div id="NewsPostDetailDate">
		{$entry->formatpostdate}
	</div>
{/if}
<h3 id="NewsPostDetailTitle">{$entry->title}</h3>

<hr id="NewsPostDetailHorizRule" />

{if $entry->summary}
	<div id="NewsPostDetailSummary">
		<strong>
			{eval var=$entry->summary}
		</strong>
	</div>
{/if}

{if $entry->category}
	<div id="NewsPostDetailCategory">
		{$category_label} {$entry->category}
	</div>
{/if}
{if $entry->author}
	<div id="NewsPostDetailAuthor">
		{$author_label} {$entry->author}
	</div>
{/if}

<div id="NewsPostDetailContent">
	{eval var=$entry->content}
</div>

{if $entry->extra}
	<div id="NewsPostDetailExtra">
		{$extra_label} {$entry->extra}
	</div>
{/if}

<div id="NewsPostDetailPrintLink">
	{$entry->printlink}
</div>
{if $return_url != ""}
<div id="NewsPostDetailReturnLink">{$return_url}</div>
{/if}

{if isset($entry->fields)}
  {foreach from=$entry->fields item='field'}
     <div class="NewsDetailField">
        {if $field->type == 'file'}
	  {* this template assumes that every file uploaded is an image of some sort, because News doesn't distinguish *}
          <img src="{$entry->file_location}/{$field->value}"/>
        {else}
          {$field->name}: {eval var=$field->value}
        {/if}
     </div>
  {/foreach}
{/if}
tina29
New Member
New Member
Posts: 6
Joined: Mon Nov 03, 2008 10:53 pm

Re: News Module Stopped Working

Post by tina29 »

You can click the link at: http://www.psychlosport.co.uk/index.php

At the bottom of the page.

Thanks

Tina
User avatar
Nullig
Power Poster
Power Poster
Posts: 2380
Joined: Fri Feb 02, 2007 4:31 pm

Re: News Module Stopped Working

Post by Nullig »

Can you post the call to the news module from your page template?
Do you have a separate page for detail news display?

Nullig
tina29
New Member
New Member
Posts: 6
Joined: Mon Nov 03, 2008 10:53 pm

Re: News Module Stopped Working

Post by tina29 »

Here is the call:

Code: Select all

{* Start News *}
<div id="news">
<h2>News</h2>
{news number='3' detailpage='news'}</div>
{* End News *}
I was able to click on the link and see the detail of the newsarticle i had created. That has now gone...
User avatar
Nullig
Power Poster
Power Poster
Posts: 2380
Joined: Fri Feb 02, 2007 4:31 pm

Re: News Module Stopped Working

Post by Nullig »

Do you have a page called "news"?

Nullig
tina29
New Member
New Member
Posts: 6
Joined: Mon Nov 03, 2008 10:53 pm

Re: News Module Stopped Working

Post by tina29 »

Nullig,

Not that i'm aware of, at least, i havent specifically created one myself, it just stopped working where it was working before.

Is this 'missing' page the problem?

Tina
User avatar
Nullig
Power Poster
Power Poster
Posts: 2380
Joined: Fri Feb 02, 2007 4:31 pm

Re: News Module Stopped Working

Post by Nullig »

Create a page called "News" with a page alias of "news", but uncheck the option to show it in the menu. In the content of the page just put:

{news}

Nullig
User avatar
Nullig
Power Poster
Power Poster
Posts: 2380
Joined: Fri Feb 02, 2007 4:31 pm

Re: News Module Stopped Working

Post by Nullig »

Looks like you got it now.

Nullig
tina29
New Member
New Member
Posts: 6
Joined: Mon Nov 03, 2008 10:53 pm

Re: News Module Stopped Working

Post by tina29 »

Nullig,

Yes, thanks for that! I created the page and it worked fine. Am I able to credit you for answering my question? :D

Much appretiated!

Tina
User avatar
Nullig
Power Poster
Power Poster
Posts: 2380
Joined: Fri Feb 02, 2007 4:31 pm

Re: [Solved] News Module Stopped Working

Post by Nullig »

No need for credit - just glad to see you got it working.

Nullig
Post Reply

Return to “CMSMS Core”