Whenever you click on listing image, it opens a popup window displaying the image, not redirecting to the actual listing

After most recent update 1.7.2 of hivepress for listinghive,
whenever you click on listing image, it opens a popup window displaying the image, not redirecting to the actual listing.
You can visit the listing only if you click exactly on the title of the listing.
image zoom
gallery preview
both are turned off.

I have the same issue. Also, syncing the vendor field with the listing field does not work. It won’t let me publish, stuck at scheduled.

Hi,

Thank you for your feedback. As soon as we test everything in more detail, we will publish the solution here: HivePress 1.7.2 - #12 by andrii

not sure, but maybe it’s something that happens if we use snippets to limit the amount of images on a listing and your slider feature is popping up to slide stuff but theres nothing to slide idk, please LOOK INTO THAT SERIOUS ISSUE :smiley:

Hello!
Figured out where the problem comes from, can’t figure out how to solve it completely.

So in the last update a file called :
listing-image.php

located at :
templates/listings/view/block

Has the following content :

<?php
// Exit if accessed directly.
defined( 'ABSPATH' ) || exit;

$image_count = count( (array) $listing->get_images__id() );
?>
<div class="hp-listing__image" data-component="carousel-slider" data-preview="false" data-url="<?php echo esc_url( hivepress()->router->get_url( 'listing_view_page', [ 'listing_id' => $listing->get_id() ] ) ); ?>">
	<?php
	if ( get_option( 'hp_listing_enable_image_preview' ) && $image_count > 1 ) :
		foreach ( $listing->get_images() as $image ) :
			if ( strpos( $image->get_mime_type(), 'video' ) === 0 ) :
				?>
				<video controls>
					<source src="<?php echo esc_url( $image->get_url() ); ?>#t=0.001" type="<?php echo esc_attr( $image->get_mime_type() ); ?>">
				</video>
			<?php else : ?>
				<img src="<?php echo esc_url( $image->get_url( 'hp_landscape_small' ) ); ?>" alt="<?php echo esc_attr( $listing->get_title() ); ?>" loading="lazy">
				<?php
			endif;
		endforeach;
	else :
		?>
		<a href="<?php echo esc_url( hivepress()->router->get_url( 'listing_view_page', [ 'listing_id' => $listing->get_id() ] ) ); ?>">
			<?php if ( $image_count >= 1 ) : ?>
				<img src="<?php echo esc_url( $listing->get_image__url( 'hp_landscape_small' ) ); ?>" alt="<?php echo esc_attr( $listing->get_title() ); ?>" loading="lazy">
			<?php else : ?>
				<img src="<?php echo esc_url( hivepress()->get_url() . '/assets/images/placeholders/image-landscape.svg' ); ?>" alt="<?php echo esc_attr( $listing->get_title() ); ?>" loading="lazy">
			<?php endif; ?>
		</a>
	<?php endif; ?>
</div>

If you replace the above code with the code from the previous version (before 1.7.2) which is this one here :

<?php
// Exit if accessed directly.
defined( 'ABSPATH' ) || exit;
?>
<div class="hp-listing__image">
	<a href="<?php echo esc_url( hivepress()->router->get_url( 'listing_view_page', [ 'listing_id' => $listing->get_id() ] ) ); ?>">
		<?php if ( $listing->get_image__url( 'hp_landscape_small' ) ) : ?>
			<img src="<?php echo esc_url( $listing->get_image__url( 'hp_landscape_small' ) ); ?>" alt="<?php echo esc_attr( $listing->get_title() ); ?>" loading="lazy">
		<?php else : ?>
			<img src="<?php echo esc_url( hivepress()->get_url() . '/assets/images/placeholders/image-landscape.svg' ); ?>" alt="<?php echo esc_attr( $listing->get_title() ); ?>" loading="lazy">
		<?php endif; ?>
	</a>
</div>

The problem is gone.

However, this obviously means that you can’t use the new sliding ‘feature’ and I have no clue what other harm such edit may cause to your site, but it solves the issue that I’ve described above.

If anyone knows what we can edit in the updated version of the file to make it work without destroying the functionality that comes with the new update, please reply.

My investigation ends here, as I have no further knowledge.
At least found where the problem comes from and eventually to offer you a temporary fix.

2 Likes

Hola a todos,
Me ocurre el mismo problema desde hace una hora que he actualizado el complemento hivepress.
Al hacer clic en la imágen de listado, no me lleva al anuncio, sino que se abre una ventana con la imagen y si lleva al listado si haces clic en el título…
Gracias


Hello everyone,
I have the same problem since an hour ago that I have updated the hivepress addon.
When I click on the listing image, it does not take me to the ad, but it opens a window with the image and it does take to the listing if you click on the title …
Thanks

Did you create it as a function or as a child template?

Just replaced the contents of 1.7.2 that includes the code for the new features with the old version of the file, but this is the lamest possible fix.
Still waiting for someone from support to call for an actual fix.

not sure if it is related, but after the update, we noticed that at least 02 code snippets are not working anymore:

Mandatory user profile picture
Mandatory user profile description

Any solution to this?

1 Like

Hello friends!
I have the same problem, I temporarily solved it by rolling back to version 1.7.1 until someone finds a solution.

Hello, I figured this has to do with Lazy Load Images in LightSpeed Cache plugin. I turned it off and now it works fine. Of course turning off Lazy Load Images makes the site a little slower, but that is where the problem was on my website.

2 Likes

the problem is precisely in the file that has been updated and i have included above.
someone has to rewrite the updated file to support the new bs without breaking the link click on the image.