Please help: News missing from webpages after upgrading from 1.08 to 1.1

Help with getting the CMS CORE package up and running. This does not include 3rd party modules, PHP scripts, anything downloaded via module manager or from any external source.
Locked
Ricky

Please help: News missing from webpages after upgrading from 1.08 to 1.1

Post by Ricky »

I'm running on php 5.2.2, Apache webserver (not sure what version). I checked the modules list and after the upgrade it says I'm now running the News module version 2.3.

I'm using the news module on the main page of the site (of course) and now none of the news articles are showing up. Looking in the admin pages, all of the news postings are there just like always.

I was using the news module in "blog fashion" and had the following custom user tags:

Code: Select all

global $gCms;

$start = ($_REQUEST['start']) ? $_REQUEST['start'] : $params['start'];
$number = ($_REQUEST['number']) ? $_REQUEST['number'] : $params['number'];

$next_uri = 'index.php?page=' . $gCms->variables['page_name'] . '&start=' . ($start + $number) . '&number=' . $number;

$smarty->assign('news_start', $start);
$smarty->assign('news_number', $number);
$smarty->assign('news_next_url', $next_uri);
I am calling the news module on the page like this:

Code: Select all

<p>{newsarchive number='10' start='0'}</p>
<p>{cms_module module='News' number=$news_number start=$news_start category='general*'}</p>
I'm sure it is some sort of problem with the way I am (was!) calling the news, as the news shows up if I just use "normal" news tags, but then I loose the "next and previous" links that I was using on the pages.

Any advice?
Ricky

Re: Please help: News missing from webpages after upgrading from 1.08 to 1.1

Post by Ricky »

I just discovered that if I change this:

Code: Select all

<p>{newsarchive number='10' start='0'}</p><p>{cms_module module='News' number=$news_number start=$news_start category='general*'}</p>
to this (change the start='0' to start='10'), it seems to work:

Code: Select all

<p>{newsarchive number='10' start='10'}</p><p>{cms_module module='News' number=$news_number start=$news_start category='general*'}</p>
I have no idea what this may break by doing so...but at least the page(s) where I'm showing the news are no longer blank.



NEW BUG: I also discovered that I get a smarty error:

Code: Select all

<p>string(89) "Smarty error: unable to read resource: "module_db_tpl:News;summarysummary_brewreview.tpl"" </p>
If I try to use the "summarytemplate='summary_brewreview.tpl" (or any custom summary template). These also worked before the upgrade.

I _think_ maybe it might have something to do with some code that is changed in the /modules/News/News.module.php file. Here is the code from the old file:

Code: Select all

/**
	 * This function is not in the API!!!
	 */
	function GetSummaryHtmlTemplate()
	{
and here is the same section in the new file:

Code: Select all

/**
     * This function is not in the API!!!
     */
    function GetSummaryHtmlTemplate()
    {
      die('deprecated');
    }
I'm using two different summary templates to show the summaries in different ways, so I really can't just edit the summary template in the news admin page, I really need to be able to call which template I want to use 'on the fly.' Judging by the code, is this "feature" now removed?

NOTE: I've fixed the template issue. Now you have to create the new template in the admin panel before you call it in the webpage. Maybe the news help needs updating to reflect this rather than just saying the template has to be in the /modules/News/templates/ directory?

Thanks in advance for any help or advice guys, and if I've forgotten any useful information I'll try to find it.

Ricky
Last edited by Ricky on Wed Jul 25, 2007 3:09 am, edited 1 time in total.
magicpio
Forum Members
Forum Members
Posts: 30
Joined: Mon Dec 05, 2005 7:54 pm

Re: Please help: News missing from webpages after upgrading from 1.08 to 1.1

Post by magicpio »

Hello,

I have the same problem, no news are being displayed after upgrade 1.0.6 --> 1.1.
The articles still exist and can be seen and edited in the admin panel.

When looking into admin/modules I got the warning "modules directory not writeble".
Maybe this has confused the install script.
I made modules writable (777) after upgrading, as well as uploads, but my news still don´t show up.

Then I uninstalled the news module, and reinstalled --> oooppps, all news are gone!
Maybe you should give a warning that, when uninstalling news, all news entries will be removed from
the database??!!

Well, I´ll dig out my backup and reinstall ....

Any solutions or proposals to the initial problem of news not shown?

Pio
calguy1000
Support Guru
Support Guru
Posts: 8169
Joined: Tue Oct 19, 2004 6:44 pm

Re: Please help: News missing from webpages after upgrading from 1.08 to 1.1

Post by calguy1000 »

With news.... if you used file templates (i.e: templates stored in modules/News/templates) then you will have to:

a) open the template in a text editor
b) select all and click copy
c) go to the News admin, Summary templates tab.... scroll down and click 'Add Template' (or whatever it's called).
d) paste the contents of the clipboard into the text area
e) in the name field use the same name (including the extension) that you used for the file template.

The moral to this story is that News no longer supports file templates, they're all stored in the database.

Now, with more testing by the user community we may have discovered this problem when the release candidates were out... and maybe we could have done something about it earlier.  However.....
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.
lizziv

Re: Please help: News missing from webpages after upgrading from 1.08 to 1.1

Post by lizziv »

After upgrading a site from 1.0.2 to 1.1 that has a basic, by which I mean no custom templates, news module, news stopped appearing with a smarty error:

string(92) "Smarty error: unable to read resource: "module_db_tpl:News

After reading calguy1000's comments here, this was the solution that worked for me:

1. Go to the Summary Template tab, press Reset to Factory Default.
2. Click Create new template. The default template appears with the name field empty. Copy and paste in the name of the old template file: orig_summary_template.tpl
3. Submit the template, then make sure it is set as default.
4. Go to the Detail Template tab, press Reset to Factory Default.
5. Click Create new template. The default template appears with the name field empty. Copy and paste in the name of the old template file: orig_detail_template.tpl
6. Submit the template, then make sure it is set as default.

After this, news works again.

V
lizziv

Re: Please help: News missing from webpages after upgrading from 1.08 to 1.1

Post by lizziv »

I found that I wasn't able to post news, due to the new "Approve News" permission not being installed on upgrade. Another site I upgraded had this permission inserted fine, but this site the permission wasn't created. Here's the fix:

1. Increment the ID in permissions_seq, then get the new value:
UPDATE `cms_permissions_seq` SET ID=ID+1;
SELECT * FROM `cms_permissions_seq` ;

2. That gave me an ID of 45, to be included in the insert:
INSERT INTO `cms_permissions` ( `permission_id` , `permission_name` , `permission_text` , `create_date` , `modified_date` )
VALUES (
'45', 'Approve News', 'Approve News For Frontend Display', 'now()', 'now()'
);

3. Add permission to groups as needed.
magicpio
Forum Members
Forum Members
Posts: 30
Joined: Mon Dec 05, 2005 7:54 pm

Re: Please help: News missing from webpages after upgrading from 1.08 to 1.1

Post by magicpio »

Hi,

I was able to fix my update issue by changing the following in my news page:

Originally my module call was

{cms_module module=news start=0 number=5 category=General}

the new call is

{news number='5' category=General}

strange ...

Pio
Locked

Return to “[locked] Installation, Setup and Upgrade”