*

Carlos Carcamo

  • ****
  • 105 posts
  • LaKompra.com
mydomain/feed error
« on: December 01, 2017, 11:16:49 PM »
Hey guys I have an issue with my web, I install the Veronika theme and give an error in my feed.

Code: [Select]
This page contains the following errors:

error on line 380 at column 22: xmlParseEntityRef: no name
Below is a rendering of the page up to the first error.

I rollback to Zara but the error persists, investigating seems like a having issues with the & or something like that, not pretty familiar with XML.

Any idea or suggestion will be great
LaKompra.com

Marked as best answer by Carlos Carcamo on December 02, 2017, 12:23:48 AM
*

MB Themes

Re: mydomain/feed error
« Reply #1 on: December 01, 2017, 11:35:29 PM »
Do you think feeds makes any sense nowadays? Anyway it is not related to theme as it should get just data from database...
  To get fast support, we need following details: Detail description, URL to reproduce problem, Screenshots

*

Carlos Carcamo

  • ****
  • 105 posts
  • LaKompra.com
Re: mydomain/feed error
« Reply #2 on: December 02, 2017, 12:27:10 AM »
hahaha you are right, do not be mad friend  ;D ;D

I'm using feeds for Facebook auto post on facebook, anyway just looking for any suggestion, I understand that is not related to veronika theme, sorry for my question.

If somebody is having issues with the feed, this is the solution, go to \oc-includes\osclass\classes\RSSFeed.php

Code: [Select]
<?php if ( ! defined('ABS_PATH')) exit('ABS_PATH is not loaded. Direct access is not allowed.');

/*
 * Copyright 2014 Osclass
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

    /**
     * This class takes items descriptions and generates a RSS feed from that information.
     * @author Osclass
     */
    
class RSSFeed {
        private 
$title;
        private 
$link;
        private 
$description;
        private 
$items;

        public function 
__construct() {
            
$this->items = array();
        }

        public function 
setTitle($title) {
            
$this->title $title;
        }

        public function 
setLink($link) {
            
$this->link $link;
        }

        public function 
setDescription($description) {
            
$this->description $description;
        }

        public function 
addItem($item) {
            
$this->items[] = $item;
        }

        public function 
dumpXML() {
            echo 
'<?xml version="1.0" encoding="UTF-8"?>
', PHP_EOL;
            echo '<rss version="2.0">', PHP_EOL;
            echo '<channel>', PHP_EOL;
            echo '<title>', $this->title, '</title>', PHP_EOL;
            echo '<link>', $this->link, '</link>', PHP_EOL;
            echo '<description>', $this->description, '</description>', PHP_EOL;
            foreach ($this->items as $item) {
                echo '<item>', PHP_EOL;
                echo '<title><![CDATA[', $item['title'], ']]></title>', PHP_EOL;
                echo '<link>', $item['link'], '</link>', PHP_EOL;
                echo '<guid>', $item['link'], '</guid>', PHP_EOL;

                echo '<description><![CDATA[';
                if(@$item['image']) {
                    echo '<a href="'.$item['image']['link'].'" title="'.$item['image']['title'].'" rel="nofollow">';
                    echo '<img style="float:left;border:0px;" src="'.$item['image']['url'].'" alt="'.$item['image']['title'].'"/> </a>';
                }
                echo $item['description'], ']]>';
                echo '</description><![CDATA[', PHP_EOL;

                echo '<country>', $item['country'], '</country>', PHP_EOL;
                echo '<region>', $item['region'], '</region>', PHP_EOL;
                echo '<city>', $item['city'], '</city>', PHP_EOL;
                echo '<cityArea>', $item['city_area'], '</cityArea>', PHP_EOL;
                echo '<category>', $item['category'], '</category>', PHP_EOL;

                echo '<pubDate>', date('r',strtotime($item['dt_pub_date'])) , '</pubDate>',']]>', PHP_EOL;
               
                echo '</item>', PHP_EOL;
            }
            echo '</channel>', PHP_EOL;
            echo '</rss>', PHP_EOL;
        }
    }
?>
LaKompra.com

*

MB Themes

Re: mydomain/feed error
« Reply #3 on: December 02, 2017, 09:00:30 AM »
Try to print that feed what is on that line and col
  To get fast support, we need following details: Detail description, URL to reproduce problem, Screenshots