- Issue created by @fox mulder
- π³π±Netherlands ptitb
Hi, to be able to help you I need the drupal and module version youβre using as well as the errors that are in the logs and/or on screen.
- ππΊHungary fox mulder
The site where I want to use the Google reviews module
Core version: 9.4.10
Google reviews version: 1.1.2simplytest.me test:
Core version: 9.5.8
Google reviews version: 1.1.2I also tried changing the code on the site where I can access the code of the module. I modified the build() functions of the blocks, but the blocks still don't appear:
GoogleReviewsBlock.php:public function build() { /* $config = $this->getConfiguration(); $reviews = $this->getGoogleData->getGoogleReviews(['rating', 'reviews'], $config['max_google_reviews'], $config['google_reviews_sorting']); if (!empty($reviews)) { $renderable = [ '#attached' => ['library' => ['googlereviews/googlereviews.reviews']], '#theme' => 'googlereviews_reviews_block', '#reviews' => $reviews['reviews'], '#place_id' => $reviews['place_id'], ]; return $renderable; } */ return ['#markup' => t('GoogleReviewsBlock')]; }
GoogleRatingBlock.php:
public function build() { /* $rating = $this->getGoogleData->getGoogleReviews([ 'rating', 'user_ratings_total', ]); if (!empty($rating)) { $rating_percentage = ($rating['rating'] / 5) * 100; $renderable = [ '#attached' => ['library' => ['googlereviews/googlereviews.rating']], '#theme' => 'googlereviews_rating_block', '#user_ratings_total' => $rating['user_ratings_total'], '#rating' => $rating['rating'], '#rating_percentage' => $rating_percentage, '#place_id' => $rating['place_id'], ]; return $renderable; } */ return ['#markup' => t('GoogleRatingBlock')]; }
- π³π±Netherlands ptitb
Can you tell me whatβs in the error logs on the site and php error logs on the server where you can access the code?
- ππΊHungary fox mulder
There are no error message on the screen nor in the logs...
- ππΊHungary fox mulder
I'm sorry for your invested time and attention... The source of the problem is the bad configuration on the Google Maps API, and Place api side
I don't know what's wrong yet, but probably your module works properlyThank you!
- Status changed to Closed: works as designed
over 1 year ago 12:15pm 16 June 2023 - π³π±Netherlands ptitb
I just tested it with the Drupal version you used and indeed found it it's working normally.
Good luck!