ideascube issueshttps://framagit.org/groups/ideascube/-/issues2017-08-03T16:19:06Zhttps://framagit.org/ideascube/ideascube/-/issues/833When deleting a blog post, the next page is the now deleted blog post itself.2017-08-03T16:19:06ZToMWhen deleting a blog post, the next page is the now deleted blog post itself.* Edit a blog post
* Set its status to `deleted`, then validate this change.
* You're redirected to the now deleted blog post.
* Confusion level raises. Madness follows.
In the other hand, it may be the only and last chance to change t...* Edit a blog post
* Set its status to `deleted`, then validate this change.
* You're redirected to the now deleted blog post.
* Confusion level raises. Madness follows.
In the other hand, it may be the only and last chance to change the status back to `draft` or `published` if selecting `deleted` was actually a mistake. Still, this is confusing. There could be a message like « This post is now deleted and won"t appear anymore in the blog. [undo] »
This is somehow related to #199https://framagit.org/ideascube/ideascube/-/issues/831The error message is not explicit when the second wifi interface doesn't exist.2017-09-21T08:56:35ZToMThe error message is not explicit when the second wifi interface doesn't exist.In the wifi administration page, some old server (running 0.29.2) with only one wifi interface was showing errors message such as « No Wi-Fi device was found » and « No Wi-Fi available ».
This is not very explicit, since the logged in a...In the wifi administration page, some old server (running 0.29.2) with only one wifi interface was showing errors message such as « No Wi-Fi device was found » and « No Wi-Fi available ».
This is not very explicit, since the logged in admin does know that there's a wifi interface (the hotspot he's actually connected to). The message could be more specific.https://framagit.org/ideascube/ideascube/-/issues/830Strange behaviour when rendering copy-pasted HTML into a blog post2018-01-15T09:32:34ZToMStrange behaviour when rendering copy-pasted HTML into a blog postOn `irc-jor-drcamman` (running 0.29.2), we found a blog post where HTML was rendered around some arabic text. Basically iit was a <span> tag with CSS suited to render the text RTL. I could not reproduce it, and removing the HTML just fix...On `irc-jor-drcamman` (running 0.29.2), we found a blog post where HTML was rendered around some arabic text. Basically iit was a <span> tag with CSS suited to render the text RTL. I could not reproduce it, and removing the HTML just fixed everything. Still, the behaviour is quite strange, maybe some migration at some point fucked up and added the rendered HTML right into the `text` value from the blogpost.
Anyway, while trying to reproduce the bug, I found an other one. I tried to copy-paste some HTML into a new blog post (copypasted right from the form's source code itself, hah the recursivity), and the HTML entities rendering was completely broken. See attachment for a more accurate description.![idb-jor-drcamman_pasting-html-then-display-it](/uploads/8cd3c87770b400717340071447bb50f6/idb-jor-drcamman_pasting-html-then-display-it.png)https://framagit.org/ideascube/ideascube/-/issues/829An empty staticfiles.json causes Internal server error2017-11-01T16:05:21ZFlorian HESLOUINAn empty staticfiles.json causes Internal server errorSome of our devices run into the following issue : "Internal server error".
It appear that the file `/var/ideascube/static/staticfiles.json` somehow get empty.
When the device start, the ideascube software runs migration and crash on...Some of our devices run into the following issue : "Internal server error".
It appear that the file `/var/ideascube/static/staticfiles.json` somehow get empty.
When the device start, the ideascube software runs migration and crash on this empty file (but existing).
Log file says : `no python application found, check your startup logs for errors`
The work around currently is to delete this file and restart uwsgi.
We should investigate, reproduce and profile this error to avoid any wider spread of this issuehttps://framagit.org/ideascube/ideascube/-/issues/828Follow-up from "Package icon"2017-07-13T13:49:24ZMathieu BridonFollow-up from "Package icon"The following discussion from !847 should be addressed:
- [ ] @bochecha started a [discussion](https://framagit.org/ideascube/ideascube/merge_requests/847#note_118319): (+2 comments)
> *Note: This is meant for the previous line, b...The following discussion from !847 should be addressed:
- [ ] @bochecha started a [discussion](https://framagit.org/ideascube/ideascube/merge_requests/847#note_118319): (+2 comments)
> *Note: This is meant for the previous line, but it seems I can't add multiple comments on the same line of the diff*
>
>
> I guess the `name` is used for the file name on the disk? What if the package id contains illegal characters, like `/`? (I realize that this is probably a much bigger problem, which could impact us in other parts of the code, I'd be fine with punting to another merge request if you prefer)https://framagit.org/ideascube/ideascube/-/issues/827Admin "manage Wi-Fi" displays an error with pi RPi32017-08-03T16:11:33ZKelsonAdmin "manage Wi-Fi" displays an error with pi RPi3On my RPi3, the admin "Manage Wi-Fi" displays the "No Wi-Fi device was found" whereas I access the RPi3 using WIFI, so it obviously works.On my RPi3, the admin "Manage Wi-Fi" displays the "No Wi-Fi device was found" whereas I access the RPi3 using WIFI, so it obviously works.https://framagit.org/ideascube/ideascube/-/issues/825Cannot update a catalog entry.2017-06-29T15:23:17ZStevenCannot update a catalog entry.Speaking of catalogs : We recently modified an URL to one of our remotes. But we cannot overwrite (with ideascube catalog add) the current entry as :
`CommandError: There already is a \"OSMybon\" remote and urls differ (http://catalog.y...Speaking of catalogs : We recently modified an URL to one of our remotes. But we cannot overwrite (with ideascube catalog add) the current entry as :
`CommandError: There already is a \"OSMybon\" remote and urls differ (http://catalog.yohanboniface.me/catalog.yml and http://catalog.ideascube.org/osmaps.yml`https://framagit.org/ideascube/omeka-to-pkg/-/issues/5Add support to package icon.2017-06-16T09:44:32ZMatthieu GautierAdd support to package icon.We need a package icon to display it (in ideascube cards, in potential package selection application, ...)
As we need to display the icon before we download or install the package, this need to be in the catalog metadata.
We agree to a...We need a package icon to display it (in ideascube cards, in potential package selection application, ...)
As we need to display the icon before we download or install the package, this need to be in the catalog metadata.
We agree to add the icon as base64 content in the catalog.
omeka-to-pkg should accept a new option "icon" pointing to (a file ? a url ?), and store it in base64 in the catalog.
Changes in the omeka side will also be needed (user interface, arguments to launch omeka-to-pkg, ...)
Ideascube side issue : https://framagit.org/ideascube/ideascube/issues/734https://framagit.org/ideascube/ideascube/-/issues/823The YAML catalog is very slow2017-09-25T13:17:54ZMathieu BridonThe YAML catalog is very slowI just tried something on a Koombook.
It has the following remotes:
```
$ ideascube catalog remotes list
[Kiwix] Kiwix ZIM content : http://catalog.ideascube.org/kiwix.yml
[OSMybon] Experimental OSM Maps catalog : http://cata...I just tried something on a Koombook.
It has the following remotes:
```
$ ideascube catalog remotes list
[Kiwix] Kiwix ZIM content : http://catalog.ideascube.org/kiwix.yml
[OSMybon] Experimental OSM Maps catalog : http://catalog.yohanboniface.me/catalog.yml
[Omeka] Omeka packages : http://catalog.ideascube.org/omeka.yml
[StaticSites] Static sites : http://catalog.ideascube.org/static-sites.yml
[bibliotecamovil] Spanish packages : http://catalog.ideascube.org/bibliotecamovil.yml
```
That gives a grand total of 214 available packages (which really isn't much) :
```
$ ideascube catalog list --available | grep -E '^ ' | wc -l
214
```
Loading the cache of available packages:
```
>>> from datetime import datetime
>>> import json
>>> import yaml
>>>
>>> with open('/var/cache/ideascube/catalog/catalog.yml', 'r') as f:
... begin = datetime.now()
... data = yaml.safe_load(f)
... end = datetime.now()
...
>>> (end - begin).total_seconds()
4.460645
```
Dumping it back to the disk:
```
>>> with open('/var/cache/ideascube/catalog/catalog.yaml2', 'w') as f:
... begin = datetime.now()
... yaml.safe_dump(data, f)
... end = datetime.now()
...
>>> (end - begin).total_seconds()
3.118451
```
So let's try dumping that same data as JSON instead, then:
```
>>> with open('/var/cache/ideascube/catalog/catalog.json', 'w') as f:
... begin = datetime.now()
... json.dump(data, f)
... end = datetime.now()
...
>>> (end - begin).total_seconds()
0.101003
```
And loading the JSON back:
```
>>> with open('/var/cache/ideascube/catalog/catalog.json') as f:
... begin = datetime.now()
... data = json.load(f)
... end = datetime.now()
...
>>> (end - begin).total_seconds()
0.019905
```
That's a pretty big difference! :open_mouth:https://framagit.org/ideascube/ideascube/-/issues/818Move /var/ideascube to /var/lib/ideascube2017-06-08T16:03:05ZMathieu BridonMove /var/ideascube to /var/lib/ideascubeLet's try and respect the FHS, shall we?
Of course, we now have quite a long history with /var/ideascube, so we need to be extremely careful with the move.
There will likely be things to change in ansiblecube as well.
So probably not ...Let's try and respect the FHS, shall we?
Of course, we now have quite a long history with /var/ideascube, so we need to be extremely careful with the move.
There will likely be things to change in ansiblecube as well.
So probably not a high priority, given the work involved and the relatively low benefits.https://framagit.org/ideascube/ideascube/-/issues/816Time to load the home page grows linearly with the number of packages installed2017-08-04T08:31:44ZMathieu BridonTime to load the home page grows linearly with the number of packages installed*This was originally tracked as #794, but was moved to its own issue because that ticket contained lots of unrelated discussion.*
Today I did some testing on a Koombook with an SSD running Ideascube 0.28.1:
| Test case | Best of 5 | Av...*This was originally tracked as #794, but was moved to its own issue because that ticket contained lots of unrelated discussion.*
Today I did some testing on a Koombook with an SSD running Ideascube 0.28.1:
| Test case | Best of 5 | Average of 5 | Worst of 5 |
| :-------- | -----------: | -----------: | ---------: |
| 0 package installed | 240859 | 254490 | 269107 |
| 1 package installed | 290943 | 320116 | 339489 |
| 2 packages installed | 349264 | 365158 | 369918 |
| 3 packages installed | 355456 | 385576 | 403352 |
| 4 packages installed | 395834 | 421828 | 465303 |
| 5 packages installed | 451208 | 473868 | 493201 |
| 10 packages installed | 579263 | 595845 | 633695 |
| 20 packages installed | 870039 | 898294 | 918156 |
If we hide all the package cards in the settings, then we are ~50000µs faster.
We should probably try and see what can be improved.
A cache (so we don't parse the YAML file every time) might help, but first, let's profile for real.https://framagit.org/ideascube/ideascube/-/issues/815The /jsi18n/ view sometimes takes very long to load2017-06-09T08:21:59ZMathieu BridonThe /jsi18n/ view sometimes takes very long to loadThis is a Django view to get the Javascript translations. It's not something we control in Ideascube, it's from Django upstream.
Just reloading the same page over and over, I'm seeing uWSGI report times ranging from 68991µs to 4295135...This is a Django view to get the Javascript translations. It's not something we control in Ideascube, it's from Django upstream.
Just reloading the same page over and over, I'm seeing uWSGI report times ranging from 68991µs to 4295135µs!
This is bonkers, there must be a way to get times that don't **vary by a factor 62**.
In addition, contrarily to other Javascript files, we can't have Nginx tell the client to cache it, because it depends on the Accept-Language header. :(
Time to profile Django upstream.https://framagit.org/ideascube/ideascube/-/issues/814We should support the creation of media in mediacenter from a oembed link.2017-06-02T14:34:02ZMatthieu GautierWe should support the creation of media in mediacenter from a oembed link.A user may want to add a youtube vidéo in the media center.
Given the youtube video url, the mediacenter should download the video and create the media.A user may want to add a youtube vidéo in the media center.
Given the youtube video url, the mediacenter should download the video and create the media.https://framagit.org/ideascube/ideascube/-/issues/813Allow all host name to connect to ideascube2017-06-01T16:06:53ZFlorian HESLOUINAllow all host name to connect to ideascube`ALLOWED_HOSTS` variable in `base.py`, `idb.py` and `kb.py` restrict access to ideascube to the given host.
It is too restrictive and we should think about opening ideascube to `*` host.`ALLOWED_HOSTS` variable in `base.py`, `idb.py` and `kb.py` restrict access to ideascube to the given host.
It is too restrictive and we should think about opening ideascube to `*` host.https://framagit.org/ideascube/ideascube/-/issues/812We have to display somehow the disk space left.2017-05-31T14:44:41ZMatthieu GautierWe have to display somehow the disk space left.The user (or just the admin) need to know what disk space left.
Before uploading media to media center, all the time, on the admin page ?The user (or just the admin) need to know what disk space left.
Before uploading media to media center, all the time, on the admin page ?https://framagit.org/ideascube/ideascube/-/issues/811Retrieve admin password2017-05-29T06:41:59ZFlorian HESLOUINRetrieve admin passwordWe have some feedback about box administrator not being able to retrieve admin password to log in as administrator, this can be due to turnover, etc.
This is quite an issue as no content can be added, the server can not be shut-down corr...We have some feedback about box administrator not being able to retrieve admin password to log in as administrator, this can be due to turnover, etc.
This is quite an issue as no content can be added, the server can not be shut-down correctly and can lead to disk corruption, etc.
We should think about a way of free password administration. For instance, we could generate at the first use a URL with a random hash. This URL would be the one to administrate the box. Of course, if the URL is lost, then access is lost too... so we should think about a robust combination of several things!https://framagit.org/ideascube/omeka-to-pkg/-/issues/4Some special character seem to crash omeka-to-pkg2017-05-19T13:05:27ZStevenSome special character seem to crash omeka-to-pkg[sample.json](/uploads/45bbd2c6b236d9896c64fe3335f5b732/sample.json)
Attached the failing JSON file.
**Running command** :
`omeka-to-pkg --package-id "photographie" --name "Photographie" --description "Vous souhaitez vous lancer, fair...[sample.json](/uploads/45bbd2c6b236d9896c64fe3335f5b732/sample.json)
Attached the failing JSON file.
**Running command** :
`omeka-to-pkg --package-id "photographie" --name "Photographie" --description "Vous souhaitez vous lancer, faire quelques photographies, mais vous avez besoin d'aide ? C'est ici !" --language "fr" --url "http://packages.ideascube.org/omeka/photographie.zip" "/mnt/synology/2-Contenus/20_photographie.json" "/var/www/omeka.bsf-intranet.org/plugins/BsfCompanion/_export/output/photographie.zip" > "/mnt/synology/2-Contenus/20_photographie.txt"`
**Error message** :
`Traceback (most recent call last):
File "/usr/local/bin/omeka-to-pkg", line 9, in <module>
load_entry_point('omekatopkg==0.0', 'console_scripts', 'omeka-to-pkg')()
File "/usr/local/src/omeka-to-pkg/lib/python3.4/site-packages/omekatopkg/__init__.py", line 133, in main
handle(args)
File "/usr/local/src/omeka-to-pkg/lib/python3.4/site-packages/omekatopkg/__init__.py", line 105, in handle
package = getattr(MediaCenterPackage, 'from_%s' % format_)(metadata_path)
File "/usr/local/src/omeka-to-pkg/lib/python3.4/site-packages/omekatopkg/package.py", line 59, in from_json
return cls(working_dir, medias)
File "/usr/local/src/omeka-to-pkg/lib/python3.4/site-packages/omekatopkg/package.py", line 16, in __init__
if self.check_media(index, media):
File "/usr/local/src/omeka-to-pkg/lib/python3.4/site-packages/omekatopkg/package.py", line 26, in check_media
if not op.exists(full_path):
File "/usr/local/src/omeka-to-pkg/lib/python3.4/genericpath.py", line 19, in exists
os.stat(path)
UnicodeEncodeError: 'ascii' codec can't encode character '\xea' in position 41: ordinal not in range(128)`Mathieu BridonMathieu Bridonhttps://framagit.org/ideascube/ideascube/-/issues/810Correctly handle extra app cards2017-05-19T09:29:14ZMathieu BridonCorrectly handle extra app cardsSome boxes enable extra app cards in their settings like BSF Campus or Khan Academy:
```python
EXTRA_APP_CARDS = [
{
'id': 'bsfcampus',
},
{
'id': 'khanacademy',
},
]
```
It would be much better if those...Some boxes enable extra app cards in their settings like BSF Campus or Khan Academy:
```python
EXTRA_APP_CARDS = [
{
'id': 'bsfcampus',
},
{
'id': 'khanacademy',
},
]
```
It would be much better if those apps were found automatically when they are installed, and we'd automatically enable/disable them accordingly, removing this from the settings.https://framagit.org/ideascube/ideascube/-/issues/809Filter languages2017-05-18T15:23:49ZMathieu BridonFilter languagesSome of the content users put in Ideascube is not related to a specific language, for example pictures, music-only media, etc...
To address this fact, we added a new value in the drop-down lists where users normally choose the language ...Some of the content users put in Ideascube is not related to a specific language, for example pictures, music-only media, etc...
To address this fact, we added a new value in the drop-down lists where users normally choose the language of a content: "suitable for all languages". In this way, users can mark content as being suitable for all languages, instead of being in a specific language. (!807)
One question still left to answer is about content filtering.
Users can list content, and filter it by language.
When they say "give me the English content", should we give them only the content in English? Or should we instead assume that what they really want is "the content I can understand" and they happen to understand English?
The latter implies that when a user requests the English content, we should return both the content in English as well as the content that is suitable for all languages.
We're leaning towards the latter strongly at this point, but that's not implemented yet.https://framagit.org/ideascube/ideascube/-/issues/808The search code is a bit unwieldy2017-05-18T13:40:17ZMathieu BridonThe search code is a bit unwieldyThe search-related code grew organically, and as a result it is a bit unwieldy.
There are basically two code paths:
* one for the global search (yes, we have one, even though it doesn't seem to be exposed in the UI anywhere)
* one for ...The search-related code grew organically, and as a result it is a bit unwieldy.
There are basically two code paths:
* one for the global search (yes, we have one, even though it doesn't seem to be exposed in the UI anywhere)
* one for the specific searches (e.g filtering medias in the mediacenter index page)
Those two branches have pretty much nothing in common. They both do their own thing until, at the very end, they call `Search.objects.filter(**kwargs)`.
I wonder if we can't make them share much, much more code.
As it is, each change must be done on both branch.
I'm also worried the global search doesn't actually work well, as it doesn't seem to be visible in the UI and we might not have tested it in a while. (if ever)
This really calls for some refactoring, let's see if we can make it better.