Forum Join our community

PHP error in certain categories.

  1. Critical
  2. Luciano Elias
  3. -
  4. TZ Portfolio Plus Support Questions
  5. -
  6. Monday, 11 February 2019
  7. -
  8.  Subscribe via email
0
Votes
Undo
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?
Comment
There are no comments made yet.
Uchiha Itachi Accepted Answer Pending Moderation
  1. Tuesday, 12 February 2019
  2. -
  3. # 1
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
Comment
There are no comments made yet.
Luciano Elias Accepted Answer Pending Moderation
  1. Tuesday, 12 February 2019
  2. -
  3. # 2
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?
Comment
There are no comments made yet.
Luciano Elias Accepted Answer Pending Moderation
  1. Tuesday, 12 February 2019
  2. -
  3. # 3
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?
Comment
There are no comments made yet.
Luciano Elias Accepted Answer Pending Moderation
  1. Tuesday, 12 February 2019
  2. -
  3. # 4
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!
Comment
There are no comments made yet.
Luciano Elias Accepted Answer Pending Moderation
  1. Tuesday, 12 February 2019
  2. -
  3. # 5
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
Comment
There are no comments made yet.
Luciano Elias Accepted Answer Pending Moderation
  1. Tuesday, 12 February 2019
  2. -
  3. # 6
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.
Comment
There are no comments made yet.
Uchiha Itachi Accepted Answer Pending Moderation
  1. Wednesday, 13 February 2019
  2. -
  3. # 7
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,
Comment
There are no comments made yet.
Luciano Elias Accepted Answer Pending Moderation
  1. Wednesday, 13 February 2019
  2. -
  3. # 8
0
Votes
Undo
Will do. Thanks!
Comment
There are no comments made yet.
  • Page :
  • 1


There are no replies made for this post yet.
Be one of the first to reply to this post!
Guest
Submit Your Response
Upload files or images for this discussion by clicking on the upload button below. Supports gif,jpg,png,zip,rar
• Insert • Remove Upload Files (Maximum File Size: 2 MB)
Share Location

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

Latitude:
Longitude: