Off Canvas sidebar is empty
  Monday, 11 February 2019
  8 Replies
  3.4K Visits
0
Votes
Undo
  Subscribe
Hello, my site started getting php errors on both these pages:

http://www.tonsurton.com.br/cristaleiras

http://tonsurton.com.br/index.php/mesas-de-centro/tags/bar/52

Warning: in_array() expects parameter 2 to be array, boolean given in /home/tonsur5/public_html/components/com_tz_portfolio_plus/models/portfolio.php on line 722


Any ideas of what it can be?
5 years ago
·
#1212
0
Votes
Undo
Will do. Thanks!
0
Votes
Undo
HI,

Thanks for your detail information! and so glad that you could handle it
We will try to check again. If this issue still arises later, kindly provide us with admin account via [email protected]. We'll help you to figure out.

Best regards,
5 years ago
·
#1209
0
Votes
Undo
I ended up moving the product to a different category.

I still don't know what happened. The category was configured exactly like others, but when the time came to render the page, it would be all screwed up.

Just moving the product/article to a different category fixed it.
5 years ago
·
#1208
0
Votes
Undo
Well, I thought everything was fine, but now that I'm looking closer, when I click on the product the product page is different than every other category.

I have double checked the category settings, article settings, global settings, template settings, and everything seems to be fine. But when it shows the article, it's all different.

It should be like this:

http://www.tonsurton.com.br/cadeiras/10-cadeira/cadeira-117/1015

But it's like this:

http://www.tonsurton.com.br/cristaleiras/59-cristaleiras/vmbc-9002/1595
5 years ago
·
#1207
0
Votes
Undo
OK, more info.

If I go in the menu>edit item>Basic Options and select yes for "Use Filter First Letter", it gives me the error. If I select no the pages goes blank.

So I went to check the category and I found out that there was no article in it. I added an article and voilá! Everything works again.

So basically I learned that you can't have a menu to a TZ portfolio that has no items in it.

I'd suggest either adding this to the documentation or finding a way so it won't display the error, but instead a message saying "no articles/products in this category".

Have a great day!
5 years ago
·
#1206
0
Votes
Undo
This is the code that's breaking:


public function getAvailableLetter(){
$params = $this -> getState('params');
if($params -> get('use_filter_first_letter',0)){
if($letters = $params -> get('tz_letters','a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z')){
$letters = explode(',',$letters);
$arr = null;

$filters = array();
if($catids = $params -> get('catid')){
$filters['catid'] = $catids;
}

if($featured = $this -> getState('filter.featured')){
$filters['featured'] = $featured;
}

if($tagId = $this -> getState('filter.tagId')){
$filters['tagId'] = $tagId;
}

if($userId = $this -> getState('filter.userId')){
$filters['userId'] = $userId;
}

if($year = $this -> getState('filter.year')){
$filters['year'] = $year;
}

if($month = $this -> getState('filter.month')){
$filters['month'] = $month;
}

$lettersArt = TZ_Portfolio_PlusContentHelper::getLetters($filters);

foreach($letters as $i => &$letter){
$letter = trim($letter);
$letterKey = ord($letter);

$arr[$i] = false;
if(in_array($letterKey, $lettersArt)){
$arr[$i] = true;
}
}

return $arr;

}
}
return false;


This is line 722:


if(in_array($letterKey, $lettersArt)){


Any ideas?
5 years ago
·
#1205
0
Votes
Undo
My Joomla is up-to-date and I'm using PHP 7.0.4.

Also, it works in every other page but those. Why is that?
0
Votes
Undo
Hi,

Thanks for your feedback!
Which PHP version are you using now? We recommend that you'd better run TZ Portfolio+ on Joomla 3.8.x + and PHP 7.x
  • Page :
  • 1
There are no replies made for this post yet.
Submit Your Response
Upload files or images for this discussion by clicking on the upload button below.
Supported: gif,jpg,png,zip,rar
· Insert · Remove
  Upload Files (Maximum 2MB)

Sharing your current location while posting a new question allow viewers to identify the location you are located.

Login