Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

UpdateProps of community settings is rejected by Hivemind as invalid #3932

Open
only-dev-time opened this issue Dec 28, 2024 · 4 comments
Open

Comments

@only-dev-time
Copy link
Contributor

only-dev-time commented Dec 28, 2024

Updating the community props with custom_json op contains the field settings which is an empty object if no image has been set.

Example

Mention by user: https://steemit.com/@event-horizon/sp64bx
Transaction: https://steemworld.org/block/91602709/91602709-13
grafik

Hivemind

Hivemind doesn't accept empty objects in the fields:

INFO:hive.indexer.community:validating @hive-117153 op ['updateProps', {'community': 'hive-117153', 'props': {'title': 'ارتقاء', 'about': 'Invitation only community for progressive desi.', 'settings': {}, 'is_nsfw': False, 'lang': 'en', 'description': '', 'flag_text': ''}}]
WARNING:hive.indexer.notify:[NOTIFY] error - src None dst 1923595 pid None (key `settings` was blank) cid None (35/100)

link to the check: https://github.com/only-dev-time/hivemind/blob/33204e1c2a18551acdb60e0a6142d1e2a4983d71/hive/indexer/community.py#L89

Analysis

With #3927 in SettingsEditButton.jsx the field settings was added to the props for the custom_json:
only-dev-time@0da5aa3#diff-0b3b832a35933fe6e6ab1230a31131d076a671c39806fc56863578bcdcb39e83R100

@the-gorilla-steem Could a check that no images has been set solve the problem?

@the-gorilla-steem
Copy link
Contributor

the-gorilla-steem commented Jan 14, 2025

I've been working on a fix for this and in doing so, I broke Hivemind. So ety001 fixed Hivemind. Which appears to have fixed the issue with community images updating. Would you mind checking and confirming this for me please?

@only-dev-time
Copy link
Contributor Author

@the-gorilla-steem I would check this, but where can I see your changes?

@the-gorilla-steem
Copy link
Contributor

@only-dev-time - the Hivemind update has already been put live so it's available on steemit.com. It appears that I don't need to update condenser.

@only-dev-time
Copy link
Contributor Author

only-dev-time commented Jan 15, 2025

@the-gorilla-steem I tested it with DU. The error still exists (I removed the old cover url before):
https://steemworld.org/block/92144888/92144888-2

INFO:hive.indexer.community:validating @moecki op ['updateProps', {'community': 'hive-146118', 'props': {'title': 'Deutsch Unplugged', 'settings': {}, 'is_nsfw': False, 'lang': 'de'}}]
WARNING:hive.indexer.notify:[NOTIFY] error - src None dst 737242 pid None (key `settings` was blank) cid None (35/100)

The fix for Hivemind concerns avatar_url, as there is a separate field for this in the community table. This must not be None. This has been fixed.

The still existing problem is that the field settings must not be empty if it is contained in the costum_json op. This still happens if cover_url and avatar_url are undefined.

the-gorilla-steem added a commit to the-gorilla-steem/condenser that referenced this issue Jan 28, 2025
Introduced a check on the 'settings' object (in Community Settings) so that it's not an empty object.  If no 'avatar_url' or 'cover_url' is set, the object will now reflect this.
ety001 pushed a commit that referenced this issue Feb 22, 2025
* Implemented "Back-to-top"

Implementation of a "Back to top" icon in the bottom right corner on Desktop devices.  Currently only on Desktop due to the design / implementation challenge on mobile devices.

* Fixed bug #3931

Removed the "overflow: hidden" from the .App_content style in Apps.scss so that any overlays do not get cropped when opened.

Bug Fix #3931

* Carousel on Mobile Devices

Implemented the Community Carousel in Communities on Mobile Devices.

Users no long need to scroll past lots of pinned posts before seeing community content.

* Updated URL structure

Updated the link structure to improve SEO for community content.

Instead of 'hive-xxxxxx' in the URL, this is replaced by the communtiy name (switched to lower case and special characters removed/updated) or if this is invalid, the 1st tag of the user content.

This update also includes implementation of updated 'canonical-url' information so that Google prioritises the more SEO friendly URL.

* Fixed Bug #3932

Introduced a check on the 'settings' object (in Community Settings) so that it's not an empty object.  If no 'avatar_url' or 'cover_url' is set, the object will now reflect this.

* Fixed /Tags Page

Introduced a getTags request to retrieve Tags information from Hivemind in order to get the /tags page working again.

This is currently hard coded to retrieve (the maximum of) 250 tags but should be configured to accept this number as a variable to allow for the future implementation of a Tag Cloud or other functionality.

Community tags (i.e. 'hive-xxxxxx) are currently filtered out of the /Tags page but a future update could introduce these as their own section.

* Bug Fix #3935

Fix for bug #3935 so that the Preview clears the floating Markdown Style Guide.

* Removed Comments and Logs

Removed unnecessary comments and console.logs from 2 files.

* Removed Log

Removed console.log from PostList.jsx

* Mobile Bug Fix for Carousel

Fixed a bug on mobile devices where the 'next' and 'previous' arrows appeared unstyled when there is only 1 pinned post.

Fix: The arrows should not appear when there is only 1 pinned post.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants