Hello,
I'm getting the following error when publishing an XML file from the CMS:
Can't call method "xmlDecl" on an undefined value at /usr/local/bricolage/data/burn/comp/oc_1028/partners/atom/mobile/cover.mc line 9.
Here is the line that is throwing the error:
$writer->xmlDecl("UTF-8");
My bricolage.conf file has this line:
INCLUDE_XML_WRITER = Yes
The story previews just fine, but throws the above error in the job queue when I publish.
Here is the entire template for reference:
<%perl>
use POSIX qw(strftime);
my $limit = 20;
my $build_date = strftime( "%a, %d %b %Y %H:%M:%S %z", localtime() );
my $copyright = "Copyright (c) " . strftime("%Y", localtime() ) . " CBS Studios Inc. All Rights Reserved.";
my $self_url = "http://www.jeffprobst.com/partners/atom/mobile/index.xml";
$writer->xmlDecl("UTF-8");
$writer->startTag("feed", "xmlns:atom" => "http://www.w3.org/2005/Atom", "xmlns:media" => "http://search.yahoo.com/mrss/", "version" => "2.0");
my $title = $story->get_title;
$writer->cdataElement("title",$title);
$writer->dataElement("updated",$build_date);
my @story_list = $story->list({ element_key_name=>"post", Limit=>$limit, Order=>"cover_date", Active=>1, publish_status=>1, published_version=>1, OrderDirection=>"DESC"});
foreach my $item (@story_list) {
$m->comp("/library/atom_item.mc", item=>$item);
}
$writer->endTag("feed");
</%perl>
Thank you so much for your assistance!
Michael Fletcher
I'm getting the following error when publishing an XML file from the CMS:
Can't call method "xmlDecl" on an undefined value at /usr/local/bricolage/data/burn/comp/oc_1028/partners/atom/mobile/cover.mc line 9.
Here is the line that is throwing the error:
$writer->xmlDecl("UTF-8");
My bricolage.conf file has this line:
INCLUDE_XML_WRITER = Yes
The story previews just fine, but throws the above error in the job queue when I publish.
Here is the entire template for reference:
<%perl>
use POSIX qw(strftime);
my $limit = 20;
my $build_date = strftime( "%a, %d %b %Y %H:%M:%S %z", localtime() );
my $copyright = "Copyright (c) " . strftime("%Y", localtime() ) . " CBS Studios Inc. All Rights Reserved.";
my $self_url = "http://www.jeffprobst.com/partners/atom/mobile/index.xml";
$writer->xmlDecl("UTF-8");
$writer->startTag("feed", "xmlns:atom" => "http://www.w3.org/2005/Atom", "xmlns:media" => "http://search.yahoo.com/mrss/", "version" => "2.0");
my $title = $story->get_title;
$writer->cdataElement("title",$title);
$writer->dataElement("updated",$build_date);
my @story_list = $story->list({ element_key_name=>"post", Limit=>$limit, Order=>"cover_date", Active=>1, publish_status=>1, published_version=>1, OrderDirection=>"DESC"});
foreach my $item (@story_list) {
$m->comp("/library/atom_item.mc", item=>$item);
}
$writer->endTag("feed");
</%perl>
Thank you so much for your assistance!
Michael Fletcher