Git Product home page Git Product logo

Comments (8)

wetneb avatar wetneb commented on June 5, 2024 2

This seems to be caused by the presence of the Commons extension, which embeds a copy of suggest-4_3a.js which conflicts with the version we have in OpenRefine. Removing the extension (until a new fixed version is released) should probably solve the problem.

from openrefine.

sebastian-berlin-wmse avatar sebastian-berlin-wmse commented on June 5, 2024 1

I've started investigating how scripts are bundled and it looks like suggest-4_3a.js is added to the project/scripts bundle. It looks like it shouldn't be if you look in controller.js so something strange seems to be going on there.

from openrefine.

trnstlntk avatar trnstlntk commented on June 5, 2024

Removing and re-adding the reconciliation services doesn't fix this issue.

from openrefine.

trnstlntk avatar trnstlntk commented on June 5, 2024

I can confirm that removing the Commons extension fixes this issue. Thanks!

from openrefine.

sebastian-berlin-wmse avatar sebastian-berlin-wmse commented on June 5, 2024

Removing the files in module/externals/suggest/ fixes this. However, it looks like it also breaks the extension. I had to go back to 3.7.9 because of #6581, but then you get the error below and clicking on Wikimedia Commons in the source list doesn't do anything.

16:02:35.547 Uncaught TypeError: $.suggest is undefined
    <anonymous> http://127.0.0.1:3333/index-bundle.js:74285
    <anonymous> http://127.0.0.1:3333/index-bundle.js:74403
index-bundle.js:74285:7
16:02:37.050 Uncaught TypeError: tr.find(...).suggestCategory is not a function
    addRow http://127.0.0.1:3333/index-bundle.js:74207
    attachUI http://127.0.0.1:3333/index-bundle.js:74235
    addSourceSelectionUI http://127.0.0.1:3333/index-bundle.js:64550
    CommonsImportingController http://127.0.0.1:3333/index-bundle.js:73843
    _initializeUI http://127.0.0.1:3333/index-bundle.js:64529
    CreateProjectUI http://127.0.0.1:3333/index-bundle.js:64509
    fire http://127.0.0.1:3333/index-bundle.js:3502
    fireWith http://127.0.0.1:3333/index-bundle.js:3632
    done http://127.0.0.1:3333/index-bundle.js:9824
    callback http://127.0.0.1:3333/index-bundle.js:10085
    send http://127.0.0.1:3333/index-bundle.js:10137
    ajax http://127.0.0.1:3333/index-bundle.js:9718
    <anonymous> http://127.0.0.1:3333/index-bundle.js:11293
    prop http://127.0.0.1:3333/index-bundle.js:11095
    _getAllProjectTags http://127.0.0.1:3333/index-bundle.js:65657
    _buildTagsListPanel http://127.0.0.1:3333/index-bundle.js:64837
    _buildTagsAndFetchProjects http://127.0.0.1:3333/index-bundle.js:64831
    OpenProjectUI http://127.0.0.1:3333/index-bundle.js:64801
    renderActionArea http://127.0.0.1:3333/index-bundle.js:64424
    <anonymous> http://127.0.0.1:3333/index-bundle.js:64428
    mightThrow http://127.0.0.1:3333/index-bundle.js:3768
    process http://127.0.0.1:3333/index-bundle.js:3836
index-bundle.js:74207:39

from openrefine.

sebastian-berlin-wmse avatar sebastian-berlin-wmse commented on June 5, 2024

Looking at the bundled javascrip code for the project page, suggest-4_3a.js is added again at the end when the extension is enabled. This could be a cause for error if it overwrites modifications that have been made to the original suggest library. E.g. wikibase-suggest.js seems to do this.

from openrefine.

wetneb avatar wetneb commented on June 5, 2024

@sebastian-berlin-wmse I have had a look at what we thought was a butterfly bug (incorrect inclusion of the Common's extension's suggest copy into the project scripts).

It seems that adding an empty macros.vm in the module folder of the extension would solve it.
Without it, Velocity fails to load them, and somehow this causes Butterfly to fall back on re-using OpenRefine's main controller.js in place of the Commons extension's own, leading to suggest-4_3a.js being registered again there.
This fallback is very unexpected I would say, so I filed a bug in Butterfly for that (OpenRefine/simile-butterfly#153). I could attempt to fix it, but I have to say the whole thing feels so brittle and broken that I am a bit unsure about whether that's the right thing to do.

from openrefine.

tfmorris avatar tfmorris commented on June 5, 2024

It seems that adding an empty macros.vm in the module folder of the extension would solve it.

Since this is about the Commons Extension, I'm going to move the conversation to OpenRefine/CommonsExtension#101

from openrefine.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.