Discourse Custom Wizard main does not work on tests-passed

Discourse Custom Wizard either has a bug, or is incompatible with the Discourse commit linked below.

Time: 2023-11-23T00:17:57+00:00
Message: ci / backend_tests has failed: Process completed with exit code 1.

Discourse

Branch: tests-passed
SHA:

Plugin

Branch: main
SHA:

Details

@angus - how much does this one matter? I’m keen to rebuild my site at the mo due to issues with Events (which I plan to uninstall).

I could just directly move it if an update isn’t wise.

Yes, this one looks serious. It only affects tests?

Seems like get_custom_field_type was removed.
That function is only used in the tests so it might be harmless but OTOH since there seems to be some custom field refactoring it might not hurt to test things first.

     NoMethodError:
       undefined method `get_custom_field_type' for Post:Class
     # ./plugins/discourse-custom-wizard/spec/extensions/custom_field_extensions_spec.rb:57:in `block (3 levels) in <main>'
     # ./spec/rails_helper.rb:489:in `block (3 levels) in <top (required)>'
     # ./spec/rails_helper.rb:484:in `block (2 levels) in <top (required)>'
     # ./spec/rails_helper.rb:473:in `block (2 levels) in <top (required)>'

  5) custom field extensions subscription custom fields group registers
     Failure/Error: expect(Group.get_custom_field_type("group_field_1")).to eq(:string)
     
     NoMethodError:
       undefined method `get_custom_field_type' for Group:Class
     # ./plugins/discourse-custom-wizard/spec/extensions/custom_field_extensions_spec.rb:107:in `block (4 levels) in <main>'
     # ./spec/rails_helper.rb:489:in `block (3 levels) in <top (required)>'
     # ./spec/rails_helper.rb:484:in `block (2 levels) in <top (required)>'
     # ./spec/rails_helper.rb:473:in `block (2 levels) in <top (required)>'

  6) custom field extensions subscription custom fields category registers
     Failure/Error: expect(Category.get_custom_field_type("category_field_1")).to eq(:json)
     
     NoMethodError:
       undefined method `get_custom_field_type' for Category:Class
     # ./plugins/discourse-custom-wizard/spec/extensions/custom_field_extensions_spec.rb:87:in `block (4 levels) in <main>'
     # ./spec/rails_helper.rb:489:in `block (3 levels) in <top (required)>'
     # ./spec/rails_helper.rb:484:in `block (2 levels) in <top (required)>'
     # ./spec/rails_helper.rb:473:in `block (2 levels) in <top (required)>'

  7) custom field extensions topic registers topic custom fields
     Failure/Error: expect(Topic.get_custom_field_type("topic_field_1")).to eq(:boolean)
     
     NoMethodError:
       undefined method `get_custom_field_type' for Topic:Class
     # ./plugins/discourse-custom-wizard/spec/extensions/custom_field_extensions_spec.rb:24:in `block (3 levels) in <main>'
     # ./spec/rails_helper.rb:489:in `block (3 levels) in <top (required)>'
     # ./spec/rails_helper.rb:484:in `block (2 levels) in <top (required)>'
     # ./spec/rails_helper.rb:473:in `block (2 levels) in <top (required)>'

This has been fixed.

3 Likes

Discourse Custom Wizard has recovered from this issue.

2 Likes