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.

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