Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • Apr 20 06:11

    ArthurHoaro on npm_and_yarn

    (compare)

  • Apr 20 06:11

    ArthurHoaro on master

    Bump ssri from 6.0.1 to 6.0.2 … Merge pull request #1743 from s… (compare)

  • Apr 20 02:24

    dependabot[bot] on npm_and_yarn

    Bump ssri from 6.0.1 to 6.0.2 … (compare)

  • Apr 14 15:53

    nodiscc on master

    Add '206 not acceptable' to the… Correct HTTP status code 206->4… Merge pull request #1739 from r… (compare)

  • Apr 12 18:28

    nodiscc on doc-fix-casing

    (compare)

  • Apr 12 18:28

    nodiscc on master

    doc: plugins.md: fix link casin… Merge pull request #1738 from s… (compare)

  • Apr 12 18:16

    nodiscc on doc-fix-casing

    doc: plugins.md: fix link casin… (compare)

  • Apr 05 10:52

    nodiscc on master

    Documentation: include all PHP … Merge pull request #1734 from A… (compare)

  • Apr 05 09:34

    ArthurHoaro on master

    Coding style: Apply automatic P… Coding style: manually fix rema… Coding style: update documentat… and 1 more (compare)

  • Apr 05 09:10

    ArthurHoaro on master

    Change legacy URL route for Add… Merge pull request #1732 from A… (compare)

  • Apr 05 09:10

    ArthurHoaro on master

    Search highlight: do not use sp… Merge pull request #1731 from A… (compare)

  • Apr 04 09:52

    ArthurHoaro on master

    Merge pull request #3 from shaa… Update Japanese translation Merge pull request #1728 from y… (compare)

  • Apr 03 11:16

    ArthurHoaro on master

    Fix a bug When we try to acces… Merge pull request #1725 from a… (compare)

  • Mar 30 15:11

    ArthurHoaro on npm_and_yarn

    (compare)

  • Mar 30 15:11

    ArthurHoaro on master

    Bump y18n from 4.0.0 to 4.0.1 … Merge pull request #1724 from s… (compare)

  • Mar 30 14:59

    dependabot[bot] on npm_and_yarn

    Bump y18n from 4.0.0 to 4.0.1 … (compare)

  • Mar 27 14:17

    nodiscc on doc-apache-directoryindex

    (compare)

  • Mar 27 14:17

    nodiscc on master

    doc: apache: explicitely ste in… Merge pull request #1718 from s… (compare)

  • Mar 27 12:26

    ArthurHoaro on master

    Bump WebThumbnailer version to … Merge pull request #1722 from A… (compare)

  • Mar 27 11:20

    ArthurHoaro on npm_and_yarn

    (compare)

ArthurHoaro
@ArthurHoaro
Next feature incoming
The Doctor
@virtadpt
?
ArthurHoaro
@ArthurHoaro
search highlights
The Doctor
@virtadpt
Oh. Nice.
grOGH
@grOGH
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)?
grOGH
@grOGH
downgraded to 0.11 and everything works again.. the update breaks reverse proxy setups in subdirectories
ArthurHoaro
@ArthurHoaro
Hi
it should work
The base path is autodetected by Slim, but I've never tried to that behind a reverse proxy
ArthurHoaro
@ArthurHoaro

OK so I just tried, and it's working fine. BUT I had to ajust the nginx rewrite rule from:

location / {
  # Slim - rewrite URLs
  try_files $uri /index.php$is_args$args;
}

to

location / {
  # Slim - rewrite URLs
  try_files $uri /shaarli/index.php$is_args$args;
}

https://shaarli-subfolder.hoa.ro/shaarli/

To clarify, I just cloned Shaarli's repo, edited .docker/nginx.conf by changing the root directory from /var/www/shaarli to /var/www (and the above change), built the Docker image, and ran it behind my usual reverse proxy.
agentcobra
@agentcobra
Hi ArthutHoaro,
I've just upgrade to v0.12.0 but still have issue to refresh thumbnails.
"An error occurred. Return code: 405"
Do I open an issue ?
ArthurHoaro
@ArthurHoaro
Hi, yes please, and don't hesitate to add as much info on your webserver setup as you think can be relevant.
matrixbot
@matrixbot
llaq Hey
llaq On my fresh shaarli installation, i have a error :
llaq On my fresh shaarli installation, i have a error :
llaq Failed to lock the file.
vendor/malkusch/lock/classes/mutex/FlockMutex.php141
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