Reviews Set Flag error

Open to all! Ask other shopowners for help.
Post Reply
radhavallabh
Senior Contributor
Posts: 466
Joined: Tue Oct 27, 2020 4:09 am
Phoenix Version: 1.1.0.6
Has thanked: 29 times
Been thanked: 3 times

Reviews Set Flag error

Post by radhavallabh »

Hi ;
Using version 1.0.8.13
I fixed the sql error for display of reviews not showing in admin by removing the " on line 73;
But the set flag issue is still remaining and does not fix -Nothing happens when we set flag to red or green in reviews-
Below is the related code to it:-

Code: Select all

$flag_link = (clone $row['link'])->set_parameter('action', 'set_flag');
          return ($row['reviews_status'] == '1')
                ? '<i class="fas fa-check-circle text-success"></i> <a href="' . $flag_link->set_parameter('flag', '0') . '"><i class="fas fa-times-circle text-muted"></i></a>'
                : '<a href="' . $flag_link->set_parameter('flag', '1') . '"><i class="fas fa-check-circle text-muted"></i></a> <i class="fas fa-times-circle text-danger"></i>';
        },
Help shall be deeply appreciated
Kind Regds./
radhavallabh


Join The Code Co-op to get access to your library in the Code Co-op Forum
radhavallabh
Senior Contributor
Posts: 466
Joined: Tue Oct 27, 2020 4:09 am
Phoenix Version: 1.1.0.6
Has thanked: 29 times
Been thanked: 3 times

Re: Reviews Set Flag error

Post by radhavallabh »

@ecartz Can you Kindly help fix this issue reviews.php in admin section please as it is occurring in default install of 1.0.8.13 also.
Thank you in advance.
Very warm Regds./
radhavallabh
radhavallabh
Senior Contributor
Posts: 466
Joined: Tue Oct 27, 2020 4:09 am
Phoenix Version: 1.1.0.6
Has thanked: 29 times
Been thanked: 3 times

Re: Reviews Set Flag error

Post by radhavallabh »

Please can someone clarify if anyone else facing the issue with reviews.php in admin section? About setting of flag as it does not work for me?
Version 1.0.8.13 ;
Warm Regds./
radhavallabh
heatherbell
Senior Contributor
Posts: 2540
Joined: Mon Oct 07, 2019 4:39 am
Phoenix Version:
Has thanked: 35 times
Been thanked: 243 times

Re: Reviews Set Flag error

Post by heatherbell »

radhavallabh wrote: Thu Apr 14, 2022 6:02 am Please can someone clarify if anyone else facing the issue with reviews.php in admin section?
I can confirm that the issue exists.
radhavallabh
Senior Contributor
Posts: 466
Joined: Tue Oct 27, 2020 4:09 am
Phoenix Version: 1.1.0.6
Has thanked: 29 times
Been thanked: 3 times

Re: Reviews Set Flag error

Post by radhavallabh »

heatherbell wrote: Thu Apr 14, 2022 6:09 am
radhavallabh wrote: Thu Apr 14, 2022 6:02 am Please can someone clarify if anyone else facing the issue with reviews.php in admin section?
I can confirm that the issue exists.
Thank you dear so will await until it is fixed by the team...
heatherbell
Senior Contributor
Posts: 2540
Joined: Mon Oct 07, 2019 4:39 am
Phoenix Version:
Has thanked: 35 times
Been thanked: 243 times

Re: Reviews Set Flag error

Post by heatherbell »

radhavallabh wrote: Thu Apr 14, 2022 6:17 am Thank you dear so will await until it is fixed by the team...
There are currently a few issues with Reviews which, I guess, maybe addressed together in the next release.
I think too few users are helping to test the release previews so some issues will go undetected.
radhavallabh
Senior Contributor
Posts: 466
Joined: Tue Oct 27, 2020 4:09 am
Phoenix Version: 1.1.0.6
Has thanked: 29 times
Been thanked: 3 times

Re: Reviews Set Flag error

Post by radhavallabh »

heatherbell wrote: Thu Apr 14, 2022 6:25 am
radhavallabh wrote: Thu Apr 14, 2022 6:17 am Thank you dear so will await until it is fixed by the team...
There are currently a few issues with Reviews which, I guess, maybe addressed together in the next release.
I think too few users are helping to test the release previews so some issues will go undetected.
As mentioned in my first post I fixed the other issues of the reviews page by doing the following
1. admin/includes/actions/reviews/views/default.php
For
Fatal error: DB: [1064] You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '"' at line 3 from

Code: Select all

remove  " from line 73
2. admin/includes/actions/reviews/views/save.php
On write a review page
Fatal error: Cannot use empty array elements in arrays in xx\admin\includes\actions\reviews\views\save.php on line 43

Remove the , and will be as below-

Code: Select all

  echo (new Tickable('reviews_rating', ['value' => $i, 'class' => 'form-check-input', 'id' => 'rating_$i'], 'radio'))->tick($i == ($rInfo->reviews_rating ?? 5));
     
3. admin/includes/actions/reviews/views/save.php
On write a review page
Warning: Use of undefined constant rows - assumed 'rows' (this will throw an Error in a future version of PHP) in xx\admin\includes\actions\reviews\views\save.php on line 52
adding '' to rows

Code: Select all

<div class="col-sm-9"><?= (new Textarea('reviews_text', ['rows' => '5', 'class' => 'form-control']))->require()->set_text($rInfo->reviews_text ?? '') . ENTRY_REVIEW_TEXT ?>
      </div>
    
4. admin/includes/actions/reviews/views/default.php
variable $review not defined
adding below on line 76

Code: Select all

global $reviews;
Issues that remain

Set flag not working


and after we manually add a review in admin below error received-
Warning: array_merge(): Expected parameter 2 to be an array, null given in /xx/admin/includes/actions/reviews/views/default.php on line 84

Warning: Invalid argument supplied for foreach() in /xx/admin/includes/classes/object_info.php on line 20


and when we try to view the added review getting below error types on each field-

Code: Select all

 Trying to get property 'customers_name' of non-object in /xx/admin/includes/actions/reviews/views/preview.php
Hope the above helps to speed it up a little from my tiny knowledge about coding....
Thank you again
Very Warm Regds./
radhavallabh
heatherbell
Senior Contributor
Posts: 2540
Joined: Mon Oct 07, 2019 4:39 am
Phoenix Version:
Has thanked: 35 times
Been thanked: 243 times

Re: Reviews Set Flag error

Post by heatherbell »

radhavallabh wrote: Thu Apr 14, 2022 7:07 am Hope the above helps to speed it up a little from my tiny knowledge about coding....
Thank you. It's always nice when people offer solutions and suggestions but I think all has been fixed getting ready for the next release https://github.com/CE-PhoenixCart/Phoen ... e/1.0.8.14
radhavallabh
Senior Contributor
Posts: 466
Joined: Tue Oct 27, 2020 4:09 am
Phoenix Version: 1.1.0.6
Has thanked: 29 times
Been thanked: 3 times

Re: Reviews Set Flag error

Post by radhavallabh »

heatherbell wrote: Wed Apr 20, 2022 6:11 am
radhavallabh wrote: Thu Apr 14, 2022 7:07 am Hope the above helps to speed it up a little from my tiny knowledge about coding....
Thank you. It's always nice when people offer solutions and suggestions but I think all has been fixed getting ready for the next release https://github.com/CE-PhoenixCart/Phoen ... e/1.0.8.14
That is great to know dear.. :)
Regds./
radhavallabh


Join The Code Co-op to get access to your library in the Code Co-op Forum
Post Reply