Forum Replies Created
I’ve had a chance to test this now and it does seem to be working correctly on comment submission and the various status changes. I’ll watch out for it being included on the next plugin update.
Kiran, thanks for the code. I will apply this and test.
But please can you let me know when this function get called?
I assume it is called when a new comment is posted, but does it also get triggered on comment status changing? So when a comment is approved or unapproved or moved to the trash?
I’ll test all those scenarios but would be helpful to know if they were considered/tested when the fix was written.
gaz36f, I think you need to start a new thread for your question about showing totals and averages.
The code Kiran posted looks to me like a fix for the bug I saw where the calculated multiratings including comments that are not approved. I don’t think it has anything to do with the display of the totals and averages.
gaz36f, I can’t really help you with how to display the counts and averages of the multiratings because my own setup uses customized templates rather than the standard shortcodes/widgets. You probably want to start a new thread for that one.
The multirating plugin is called “GeoDirectory Review Rating Manager” for me. This is on GD v2.
Still no fix for the totals/counts update bug BTW.
Thank you Naveen.
I think that asking for credentials should be a last resort if you are unable to reproduce a problem in a test environment of your own, not a first resort.
So are you saying you can’t reproduce this? It doesn’t get HTML escaped for you?
Steps to reproduce:
1. In the Custom Fields for a GD post type, enter a Field Description containing HTML e.g.
See our <a href="/vendor-faq/" target="_blank">Vendor FAQ</a> for more information.
2. View the add listing form on the front end.
The field description contains an HTML link
The field description contains escaped HTML on the page.
Also shown in the screenshots above.
I saw the core release come out (GD 184.108.40.206) and I’ve updated my dev site so I can test.
The bug is still there with the latest core update. The latest GeoDirectory Review Rating Manager is unchanged at 220.127.116.11.
I’d appreciate it if you can provide me with update to fix this bug (I assume it’s to Review Rating Manager rather than core). It is causing problems on my live site and looks pretty bad to have average ratings that don’t make sense alongside the reviews that are visible.This reply has been marked as private.
Any update on this? It’s quite a bad bug for the averages not to add up.
I was reminded of this today because someone noticed in passing that the averages do not make sense next to the reviews! e.g. a listing can have one review with all 4 star ratings yet the averages at the top could be all 3 stars – e.g. because there were other reviews that were deleted or are in moderation.This reply has been marked as private.
Fantastic! Is that a fix to the WP All Import add-on and/or the CSV import?
Is the fix(es) on GitHub?
In addition, I just looked into using the GD native import just to set logos, and found that it adds the logo TWICE for each listing!
I’ve got the categories working by specifying in both places as described above BUT still no success setting the logo.
You can do a completely bare-bones import to test this. Sample XML:
<?xml version="1.0" encoding="UTF-8"?> <data> <Listing> <Title>Test Listing</Title> <LogoURL>http://blah.com/wp-content/uploads/2019/09/logo.png</LogoURL> </Listing> </data>
In WP All import you only need to configure the title and GD section logo fields. Obviously the URL above needs to point to a real image file.
This is into a CPT using the standard Company Logo field. If I then export the data using the standard GD CSV export I can see the logo field has been set to exactly the value entered, but the logo is not showing on the listing.
I tried adding 3 pipes as in the docs for a native GD import but that made no difference.
I think the problem is that GD only sets the value, it does not add an entry into the attachments table wp_geodir_attachments.
I have investigated the categories further.
I was using WP All Import’s standard feature for importing taxonomies for the categories. Then I saw that the section for GD import settings also contains fields for Category and Default Category so I have tried using these as well.
What I found is that the GD import settings do set the categories correctly on the WP admin edit page and the details page on the frontend BUT they do not set the categories correctly so they appear in the categories column when viewing all listings in WP admin. The WP All Import taxonomy import feature does the opposite!
So to import categories fully it appears that you have to use both the GD and WP All Import category fields.