Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #1234405

    I am building a directory using Portfolio Items for business listings. I am using the Masonry Element with Portfolio Item custom categories on a page level. If there are no category matches, the element is returning ALL RESULTS (Should be none). If I use the same exact setup on a page with a Portfolio Item with a Category match, the results work perfectly as expected.

    I think I may have discovered a bug with regards to portfolio items in the masonry element. In my mind if there are no category matches, the element should display NO RESULTS, but instead it is showing ALL RESULTS.

    I have made a brief video for you demonstrating the issue as this is easier than uploading multiple screen shots. Please advise if you can’t see the video or understand the issue.

    FYI, I have tested this with the same element using Posts instead of Portfolio Items and it works as expected, this appears to be unique to Portfolio Item categories.

    I would rather not share my links in public form, they are shared in Private space below. If you require a login, please let me know. Thank you.

    #1235014

    Hey mickya1,

    Thank you for the inquiry.

    I think I may have discovered a bug with regards to portfolio items in the masonry element. In my mind if there are no category matches, the element should display NO RESULTS, but instead it is showing ALL RESULTS.

    The element should return an empty string if there are no entries or if the loop is empty. We tried to reproduce the issue on our local installation but we’re not able to do so. Could you provide an admin account so that we can check the issue on your installation?

    Best regards,
    Ismael

    #1235094

    Ismael,

    Thanks for the reply. I have shared with you admin credentials in secure space below. I’ll look forward to your reply.

    Jeff

    #1235697

    Hi,

    Thank you for the info.

    I will have to retract my previous statement. It turned out that this is the default behavior of the Masonry element. It will return all posts or used all the available terms in the taxonomy when the selected terms or categories are empty or don’t contain any items. The reason we didn’t see the items previously is because of a jQuery error which is unrelated to this topic.

    You should see this block of code in the enfold\config-templatebuilder\avia-shortcodes\av-helper-masonry.php file around line 967:

    	//check if any of the terms passed are valid. if not all existing terms are used
    				$valid_terms = array();
    				foreach( $terms as $term )
    				{
    					if( in_array( $term, $avialable_terms ) )
    					{
    						$valid_terms[] = $term;
    					}
    				}
    

    This checks if the selected terms or categories are not empty but if none of them passed or none of of the selected categories contain any post, all categories are used. You may need to remove the Masonry element from the page temporarily until the required posts or items actually exist.

    Best regards,
    Ismael

    #1235761

    @ismael thanks for taking a look. I have a “Plan B” workaround planned for my needs. Please close this thread and keep up the great work! Jeff

    #1235895

    Hi,

    I’m glad this was resolved. If you need additional help, please let us know here in the forums.

    Best regards,
    Jordan Shannon

Viewing 6 posts - 1 through 6 (of 6 total)
  • The topic ‘Portfolio Items – Masonry Element – Unassigned Categories Bug?’ is closed to new replies.