Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • Oct 10 13:07

    nodiscc on doc-composer

    (compare)

  • Oct 02 11:25

    nodiscc on master

    doc: fix homepage title/icon re… Merge pull request #1804 from n… (compare)

  • Sep 23 06:32

    ArthurHoaro on master

    Ignore plugins except for those… Merge branch 'master' of github… Merge branch 'master' of github… and 7 more (compare)

  • Sep 05 08:22

    dependabot[bot] on npm_and_yarn

    (compare)

  • Sep 05 08:22

    ArthurHoaro on master

    Bump tar from 6.1.3 to 6.1.11 … Merge pull request #1795 from s… (compare)

  • Sep 05 07:28

    ArthurHoaro on master

    remove travis from README.md Merge pull request #1786 from y… (compare)

  • Sep 05 07:27

    ArthurHoaro on master

    Intuitive checkbox for Enabled … Merge pull request #1791 from y… (compare)

  • Aug 31 16:51

    dependabot[bot] on npm_and_yarn

    Bump tar from 6.1.3 to 6.1.11 … (compare)

  • Aug 14 08:53

    ArthurHoaro on master

    Add Chinese (Simplified) transl… UT: bump number of languages Merge pull request #1781 from y… (compare)

  • Aug 14 00:21

    nodiscc on npm_and_yarn

    (compare)

  • Aug 14 00:21

    nodiscc on master

    Bump path-parse from 1.0.6 to 1… Merge pull request #1784 from s… (compare)

  • Aug 14 00:21

    nodiscc on npm_and_yarn

    (compare)

  • Aug 14 00:21

    nodiscc on master

    Bump tar from 6.1.0 to 6.1.3 B… Merge pull request #1780 from s… (compare)

  • Aug 10 22:52

    dependabot[bot] on npm_and_yarn

    Bump path-parse from 1.0.6 to 1… (compare)

  • Aug 03 19:55

    dependabot[bot] on npm_and_yarn

    Bump tar from 6.1.0 to 6.1.3 B… (compare)

  • Aug 02 13:52

    nodiscc on master

    doc: remove the markdown plugin… Merge pull request #1779 from l… (compare)

  • Jul 19 17:02

    nodiscc on master

    doc: add notice about nginx loc… Merge pull request #1768 from n… (compare)

  • Jul 19 17:02

    nodiscc on master

    doc: LDAP login support, update… Merge pull request #1769 from n… (compare)

  • Jul 19 17:02

    nodiscc on master

    doc: bookmarklet is now working… Merge pull request #1767 from n… (compare)

  • Jul 19 16:58

    nodiscc on master

    build and push docker images us… Merge pull request #1765 from n… (compare)

ArthurHoaro
@ArthurHoaro
matrixbot
@matrixbot
llaq OK, i create this file

llaq Error : An unexpected error happened, and the error template could not be displayed.

Couldn't load data from the data store file "data/datastore.php". Your data might be corrupted, or your file isn't readable.

llaq ls -l result : -rw-r--r-- 1 root root 0 Dec 6 19:03 datastore.php
llaq * ls -l result :
-rw-r--r-- 1 root root 0 Dec 6 19:03 datastore.php
kalvn
@kalvn
When developing plugins, I noticed that when I raise an exception in the hook_pluginname_save_link function, nothing happens on application side. It's like no error occurred. I guess that the error is catched by Shaarli and sent to the next template rendering function but since the response to POST /shaare is a 302, the user never sees the error.
Would there be a way to provide better error handling for plugins? We could imagine something similar to middlewares in most web frameworks (Slim, Express.js, etc.) where each plugin would be responsible for calling the next one and could interrupt the chain with an exception if relevant, or keep going but still logging the exception somewhere so that it can be displayed in the UI.
ArthurHoaro
@ArthurHoaro
Exception messages are passed to templates using plugin_errors variable. It prevents plugins from making Shaarli unusable due to (for example) plugin compatibility issue. In the default template it used in page.header.html.
If you think errors should be handled in a better way, you can open an issue, but I'm not in favor of blocking everything due to plugin errors.
kalvn
@kalvn
That's a good point, I totally agree that unexpected exceptions happening in plugins must never block Shaarli itself. I was more thinking about "expected" errors. For exemple in your plugin shaarli2twitter, if for some reason the request to Twitter API doesn't work, the link will still be created and you'll have no chance to try again. And because of the redirection after the HTTP POST, you'll not even see the error.
I was thinking maybe about using a function accessible to plugins that would allow to push an error somewhere in an array, indicating whether it should be blocking or not. Then Shaarli could react accordingly.
But I understand it brings quite a bit of complexity which might not be ideal.
ArthurHoaro
@ArthurHoaro

Ah sorry I missed the redirection part of your message. I have recently develop such a feature, similar to Symfony flashbag, here:

We should find a proper way to tie the SessionManager with plugins, BUT if you want to hack your way through, you might get the result you want by using superglobals, e.g. $_SESSION['global_errors'][] = 'Noooo!';.

kalvn
@kalvn
Good to know, thanks :)
goodelyfe
@goodelyfe
greetings!!
corrupt or unreadable datastore.php.... but you blv it is good. What next? Could the error on the initial install in regards to Slim, could that give off the issue?
ArthurHoaro
@ArthurHoaro
Sorry I don't understand your message. Could you give more details?
goodelyfe
@goodelyfe

@ArthurHoaro my apologies.

So anywho, doing some research of backing up and restoring...I found retrieving the datastore.php is where all of your clippings/saved things are.

I pulled the datastore.php and transferred it to where it was supposed to go (/data/)

But I'm getting this error: https://pastebin.com/NBwv8e8K

That made me think of the initial installation process. I remember seeing something about 'slim' under the php prerequisites

I strongly blv my datastore.php is still in tact. not corrupted and is readable as it was still working
goodelyfe
@goodelyfe
FWIW, i pulled this off an older instance of a NAS and putting it in a docker on raspberry pi
ArthurHoaro
@ArthurHoaro
I agree that this message is not very explicit and should be updated. This error means that the datastore file is not writable by your web server's user.
goodelyfe
@goodelyfe
I know that can vary by system
but how do i do that?
I know it has to do with permissions
chown httpduser? www user?
@ArthurHoaro thank you for your responses btw!!!
nodiscc
@nodiscc
@goodelyfe make sure your datastore.php is owned and readable by your webserver user (usually www-data)

It should read something like this

srvadmin@demo1:~$ sudo ls -l /var/www/links.xinit.se/data/datastore.php
-rw-r--r-- 1 www-data www-data 2379 Apr 11 18:03 /var/www/links.xinit.se/data/datastore.php

www-data must have rw permissions so if it doesn't: sudo chown www-data /path/to/your/datastore.php; sudo chmod u+rw /path/to/your/datastore.php

goodelyfe
@goodelyfe
@nodiscc Thank you for the reply!
How much different is it that I'm on running shaarli on docker?
goodelyfe
@goodelyfe
so just for sh*ts and giggles, i ran that on other files in the directory. Is it safe to say, that said user on the other files would be also be the user for the datastore.php too? weird user never seen before, but never had to mess around within the docker webserver user either.
That may explain when i tried to link explicit volumes to it and my spidy senses were screaming permissions. Going to try again with a docker compose. Any help would be greatly appreciated!
also...does shaarli/shaarli build for arm32v7/armhf? Could i build it with wget and all that? I only ask because i got Shaarli working with ugeek/shaarli:arm i blv
C-Duv
@C-Duv

hi folks, my docker just auto-updated to 0.12, and now my installation is broken - all links, assets etc. ignore the subdirectory shaarli is installed in
I cant find any release notes or migration guides - does shaarli no longer support installation in a subdirectory (with reverse proxy)?

Hello, I more or less have the same issue. Shaarli v0.11.1 is working just fine on my setup:

  • PHP 7.3
  • Nginx server as a reverse proxy (listens to ports 80 and 443), forwarding to Apache
  • Apache server listen to port 8080 runs PHP with mod_php
  • Shaarli installed in /shaarli/ subdirectory

But with v0.12.1 Shaarli behave just like if mod_rewrite was disabled:

  • a GET /shaarli/tags/cloud fails with a 404 Not Found
  • a GET /shaarli/index.php/tags/cloud works (200 OK)

Setting general.root_url to https://www.example.com/shaarli/index.php/ in config.json.phpas advised in the documentation does not fixes the issue (GET /shaarli/tags/cloud still returns a 404).

Is this a bug I should post on GitHub?

ArthurHoaro
@ArthurHoaro
Hi. There is probably a misconfiguration somewhere; and my guess would be with Apache's URL rewriting: is .htaccess properly allowed? You can also try to include these directives in your vHost configuration directly: https://github.com/shaarli/Shaarli/blob/master/.htaccess#L16-L21
If that doesn't help you can open a support issue on github with your web servers config files as it will be easier to follow.
C-Duv
@C-Duv
You were right, I had a misconfiguration: the .htaccess were not taken into account by Apache (they disallowed AllowOverride in <Directory> with regular expression: and I did not know that...). One this part was fixed everything work just fine without any hack on change in .htaccess`: Thanks for the pointer.
qbi
@qbi:matrix.kraut.space
[m]
I have an issue with my Shaarli installation. Sometimes, when an old session has expired, I have to re-login. However when I enter the credentials, Shaarli shows an error message "Wrong token" and it is not possible to log in.
Can you tell how to resolve this or how I can investigate into this issue?
I already tried to play around with general.root_url and security.session_protection_disabled. Both led to no results. Also the logfiles don't give a clue.
aynish
@aynish:sealight.xyz
[m]
hey everyone i'm trying to diagnose why my shaarli install isn't able to rewrite urls for the API. I'm using nginx on nixOS, and have setup php-fpm and nginx as per the config. the location for ~ (index).php doesn't seem to be able to find the correct rewrite for try_files $uri =404; ? not really sure how to go about debugging this, so any pointers would be appreciated! :)
nodiscc
@nodiscc
@aynish:sealight.xyz you can enable debugging for URL rewriting in nginx https://serverfault.com/questions/333048/best-way-to-debug-nginx-rewrite-rules-in-config-file
If you're stuck please post your full setup on https://github.com/shaarli/Shaarli/issues/ including installed version, installation method/commands used, nginx/php-fpm configuration, error/debug logs, expected behavior/observed behavior etc etc
aynish
@aynish:sealight.xyz
[m]
thank you nodiscc! ill give that a go :)
agentcobra
@agentcobra
Hi everybody,
I'm starting a skin before google favoris shutdown
https://lab.frogg.it/agentcobra/google_favoris #WIP
SnowCode
@chopin2712
Hello
I am very new to this software
I've just installed it, but the "tag cloud" doesn't work
Here is the error message:
The page is just blank, but it seems the rest of functions works
Can you help me?
dgleba
@dgleba
When I import google bookmarks export, tags with spaces in the tagname are split into separate tags in Shaarli. How can I import with tags with spaces that remain all as one tag?
dgleba
@dgleba
I did set the tags separator to a semi colon before importing.