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

In the browser filering on keywords does not work #1

Open
octavsly opened this issue Jan 14, 2024 · 5 comments
Open

In the browser filering on keywords does not work #1

octavsly opened this issue Jan 14, 2024 · 5 comments
Assignees
Labels
bug Something isn't working

Comments

@octavsly
Copy link

I have attached keywords to various carnet cards/notes.
If I click on the keyword on the left, no filtering is happening.

In contrast, the Android app works as expected.

Carnet Server version 0.25.2
Android app: 0.25.1-20230814.1911

@Playnary
Copy link

Playnary commented Jan 16, 2024

I can confirm this bug with Carnet 0.25.2 and NC 28.0.1

@Playnary
Copy link

This does not seem to a problem with the NoteController.php or PageController.php, as suggested in CarnetApp/CarnetNextcloud#214

Rather, there's an error thrown for templates/CarnetWebClient/browsers/browser.js , which is a bootstrap/webpack-compiled file, as far as I can see. The error is:

browser.js:14065 
Uncaught ReferenceError: KeywordsDBManager is not defined

this refers to webpack_module 9622 and
const KeywordsDBManager = (__webpack_require__(9622)/* .KeywordsDBManager */ .P)

I can't really tell what the problem is, though. That module seems to work for listing the keywords in the sidebar. The error is only thrown when clicking on one.

@Playnary
Copy link

Playnary commented Jan 22, 2024

I found an interim solution:

In the file templates/CarnetWebClient/browsers/browser.js find

/***/ 7156:
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {

/* provided dependency */ var console = __webpack_require__(5108);
const RecentDBManager = (__webpack_require__(4808)/* .RecentDBManager */ .L)
const RequestBuilder = (__webpack_require__(2332)/* .RequestBuilder */ .c)

which should be around line 14016
and then add

const KeywordsDBManager = (__webpack_require__(9622)/* .KeywordsDBManager */ .P)

I am not really fluent with webpack, but I think this change should be made on the compile-side of things, not with the output template files. So this is not the permanent fix. But for now this seems to do the trick.

edit:
Also remember to flush your cache / do a strg+r/f5 reload of carnet after the fix, since these are javascript files that your machine will not necessarely update immediately.

@PhieF
Copy link
Contributor

PhieF commented Feb 19, 2024

@Playnary good fix indeed

webpack is kind of compiled, I've fixed it inside CarnetWebClient/src/browsers/file-browser.js

@PhieF PhieF transferred this issue from CarnetApp/CarnetNextcloud Feb 19, 2024
@Playnary
Copy link

Great, glad that I could help a little. Do I see correctly that this fix isn't yet in the latest version commit?

(Thanks, by the way! It is indeed good to see that Carnet keeps the head above water :) And I'll happily help maintain upcoming issues, I really like and use it a lot.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants