No sections defined

Permalink Browser Info Environment
I have installed the Easy News 1.1 block to my Concrete 5.5 website and I am having an issue setting the section to publish news within. I have added the 'NEWS Section' attribute to my news page, ticked the box and saved the setting. However, when I visit the Easy News page within the dashboard and try adding my first news entry, it doesn't have any pages to choose from for the section to place the news item into:

No sections defined. Please create a page with the attribute "simplenews_entry" set to true.

I have tried clearing the cache (several times), re-adding the NEWS Section attribute to the page, adding the attribute to a different page, reinstalling the package, etc... I noticed the attribute handle of NEWS Section is not actually 'simplenews_entry', but is in fact 'easynews_section', but this didn't stop the add-on working on another v5.5 site I had developed. I tried adding an attribute with a handle of 'simplenews_entry' to the page but, as I suspected, it made no difference.

Any ideas?

Type: Discussion
Status: New
twomoonsconsulting
View Replies:
hanicker replied on at Permalink Reply
hanicker
Hum, this is the first time this problem is reported.

The way this package finds news section is through the core pagelist model:
$newsSectionList = new PageList();
$newsSectionList->filterByEasynewsSection(1);
.

Maybe it has been overwritten, or something like that.
You can confirm that the news section is published?

A way to get around this problem is to edit
easy_news/single_pages/dashboard/easy_news/controller.php

line 41
after foreach add
$sections[NEWSSECTIONID] = 'News section';
where NEWSSECTIONID is the id you get when editing news section in the address bar

Hope this helps
Nick
twomoonsconsulting replied on at Permalink Reply
twomoonsconsulting
Thanks for your help Nick. I left the site overnight and what do you know, I logged in this morning to revisit the problem and it is now working! Maybe all I needed to do is log out and back in...

Next question, can I specify a default page type for each news entry?
hanicker replied on at Permalink Reply
hanicker
Great!

You need to edit the view.php in
easy_news\single_pages\dashboard\easy_news

replacing
<strong><?php echo $form->label('ctID', t('Page Type'))?></strong>
   <div><?php echo $form->select('ctID', $pageTypes, $ctID)?></div>

with
<input type="hidden" name="ctID" value="CTID" />

where CTID is the id you get from address bar when editing page type.

This should work

Regards
Nick
sacp replied on at Permalink Reply
sacp
Hi.

I would like to define default (or only one) page for easy news.
Was trying your sugestion, but my view.php file does not have any of that code.

The only code is:

<?php 
defined('C5_EXECUTE') or die(_("Access Denied."));
?>


SEarched other files and didn't see it, maybe I'm missing some folder.

Thanks
zeker replied on at Permalink Reply
zeker
Hi, We had the exact same problem. Loggin out and back in did solve the problem. Great!

Thanx for that.

concrete5 Environment Information

Browser User-Agent String

Hide Post Content

This will replace the post content with the message: "Content has been removed by an Administrator"

Hide Content

Request Refund

You have not specified a license for this support ticket. You must have a valid license assigned to a support ticket to request a refund.