Error in /gk_storebox/html/com_content/article/default.php

Rate this topic: Evaluations: 1, 1.00 on the average.Evaluations: 1, 1.00 on the average.Evaluations: 1, 1.00 on the average.Evaluations: 1, 1.00 on the average.Evaluations: 1, 1.00 on the average.Evaluations: 1, 1.00 on the average.1.00 out of 6 based on 1 vote(s)
GK User
Wed Jul 16, 2014 9:58 am
Reply with quote
Report this post
Hi guys, just wanted to let you know I installed StoreBox on Joomla 3.3 (quickstart package) and soon noticed that article titles weren't showing, so I checked the code and found that there is an error in the php code as follows:
<h1 itemprop="name"
<?php if ($params->get('link_titles') && !empty($this->item->readmore_link)) : ?>
<a href="<?php echo $this->item->readmore_link; ?>" itemprop="url"
<?php echo $this->escape($this->item->title); ?>
</a>
<?php else : ?>
<?php echo $this->escape($this->item->title); ?>
<?php endif; ?>
</h1>

As you may notice too, the h1 and a tags are not closed so it creates an HTML code that won't show titles in the pages
I just fix it by closing the tag :
<h1 itemprop="name">
<?php if ($params->get('link_titles') && !empty($this->item->readmore_link)) : ?>
<a href="<?php echo $this->item->readmore_link; ?>" itemprop="url">
<?php echo $this->escape($this->item->title); ?>
</a>
<?php else : ?>
<?php echo $this->escape($this->item->title); ?>
<?php endif; ?>
</h1>
User avatar
Fresh Boarder

GK User
Wed Jul 16, 2014 10:41 am
Reply with quote
Report this post
Both codes are exactly same.
User avatar
Moderator

GK User
Wed Jul 16, 2014 10:43 am
Reply with quote
Report this post
This code:
Code: Select all
      <h1>
         <?php if ($params->get('link_titles') && !empty($this->item->readmore_link)) : ?>
            <a href="<?php echo $this->item->readmore_link; ?>">
               <?php echo $this->escape($this->item->title); ?>
            </a>
         <?php else : ?>
            <?php echo $this->escape($this->item->title); ?>
         <?php endif; ?>
      </h1>

Is completly correct - both a and h1 tags are closed. I have this code in my templates/gk_storebox/html/com_content/article/default.php
file.
User avatar
Moderator

GK User
Wed Jul 16, 2014 10:51 am
Reply with quote
Report this post
I don't know how come I had this, but codes are not the same look closely:
<h1 itemprop="name"
...
<a href="<?php echo $this->item->readmore_link; ?>" itemprop="url"

both tags were not closed. As soon as I closed them it worked like a charm.
Just wanted to post it in case somebody's got the same problem.
User avatar
Fresh Boarder

GK User
Wed Jul 16, 2014 10:59 am
Reply with quote
Report this post
I unzip the storebox file I used and the file attached is the screenshot of the one that was inside the compressed file I downloaded and used on my website.
If you want I can send you the zip file I downloaded so you can check how come there's this file.
User avatar
Fresh Boarder

GK User
Wed Jul 16, 2014 12:55 pm
Reply with quote
Report this post
Please update your template to the newest version - there should be no issue like that after the update.
User avatar
Moderator

GK User
Wed Jul 16, 2014 1:01 pm
Reply with quote
Report this post
Ok, I see this problem is in our current release. I'll post that to our devteam so they can fix.
Thanks for the bug raport.
User avatar
Moderator

GK User
Wed Jul 16, 2014 1:04 pm
Reply with quote
Report this post
You're welcome! :)
glad I was useful
User avatar
Fresh Boarder


cron