Page 1 of 1

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

Posted: Wed Jul 25, 2007 1:57 am
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?

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

Posted: Wed Jul 25, 2007 2:10 am
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

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

Posted: Fri Jul 27, 2007 10:10 pm
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

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

Posted: Fri Jul 27, 2007 10:24 pm
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.....

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

Posted: Sat Jul 28, 2007 5:07 am
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

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

Posted: Sat Jul 28, 2007 5:48 am
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.

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

Posted: Sun Jul 29, 2007 9:19 pm
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