fission-codes / discourse-ipfs-file-store

A Discourse plugin to use IPFS to store files
GNU General Public License v2.0
6 stars 1 forks source link

Editing a post that has an IPFS file in it won't allow it to be saved again #1

Closed bmann closed 4 years ago

bmann commented 4 years ago

Shows an "Internal Server Error" and this is what logs say:

Message (4 copies reported)

RuntimeError (Not implemented.)
/var/www/discourse/lib/file_store/base_store.rb:175:in `not_implemented'

Backtrace

/var/www/discourse/lib/file_store/base_store.rb:175:in `not_implemented'
/var/www/discourse/lib/file_store/base_store.rb:42:in `has_been_uploaded?'
/var/www/discourse/lib/url_helper.rb:40:in `is_local'
/var/www/discourse/app/services/search_indexer.rb:241:in `block in start_element'
/var/www/discourse/app/services/search_indexer.rb:237:in `each'
/var/www/discourse/app/services/search_indexer.rb:237:in `start_element'
nokogiri-1.10.8/lib/nokogiri/html/sax/parser.rb:36:in `parse_with'
nokogiri-1.10.8/lib/nokogiri/html/sax/parser.rb:36:in `parse_memory'
nokogiri-1.10.8/lib/nokogiri/xml/sax/parser.rb:83:in `parse'
/var/www/discourse/app/services/search_indexer.rb:227:in `scrub'

Env

HTTP HOSTS: talk.fission.codes

This Job Exception seems to also be looking to post process images and looks like it might also be related:

Message (18 copies reported)

Job exception: Not implemented.

Backtrace

/var/www/discourse/lib/file_store/base_store.rb:175:in `not_implemented'
/var/www/discourse/lib/file_store/base_store.rb:42:in `has_been_uploaded?'
/var/www/discourse/lib/url_helper.rb:40:in `is_local'
/var/www/discourse/lib/url_helper.rb:75:in `cook_url'
/var/www/discourse/lib/cooked_post_processor.rb:430:in `add_lightbox!'
/var/www/discourse/lib/cooked_post_processor.rb:360:in `convert_to_link!'
/var/www/discourse/lib/cooked_post_processor.rb:705:in `block in post_process_images'
/var/www/discourse/vendor/bundle/ruby/2.6.0/gems/nokogiri-1.10.8/lib/nokogiri/xml/node_set.rb:238:in `block in each'
/var/www/discourse/vendor/bundle/ruby/2.6.0/gems/nokogiri-1.10.8/lib/nokogiri/xml/node_set.rb:237:in `upto'
/var/www/discourse/vendor/bundle/ruby/2.6.0/gems/nokogiri-1.10.8/lib/nokogiri/xml/node_set.rb:237:in `each'
kareem commented 4 years ago

Hey @bmann this makes me think that you might be on master and not the v1 branch. The has_been_uploaded? method is implemented on v1 and should not raise a not_implemented exception:

https://github.com/fission-suite/discourse-ipfs-file-store/blob/v1/lib/ipfs_store.rb#L63

When I edit a Discourse post with an image that lives on IPFS all is good.

Also - I've updated the readme to include switching to the v1 branch before testing. My bad for forgetting to do this previously.

Can you confirm whether you're still seeing an exception?

kareem commented 4 years ago

Closing for now, doesn't sound like this is an issue anymore.