mtierltd / timetracker

GNU Affero General Public License v3.0
83 stars 28 forks source link

User cannot be assigned to projects #152

Open denkwende opened 3 years ago

denkwende commented 3 years ago

Since some days users cannot be assigned to projects. grafik

jjanarnava commented 3 years ago

same here: NC 22.2.0, php 8.0.12, Time Tracker 0.0.72

jjanarnava commented 2 years ago

any news or outlook for a fix?

denkwende commented 2 years ago

same question here. thanks

upultfs commented 2 years ago

is there any update for this issue ??

mxc commented 2 years ago

Also experiencing this issue. There is no error in the javascript console and the server logs only show the following:

192.168.45.251 - - [11/Jan/2022:17:12:27 +0600] "GET /index.php/apps/timetracker/ajax/tags HTTP/1.1" 200 6210 "-" "Mozilla/5.0 (X11; Linux x86_64; rv:95.0) Gecko/20100101 Firefox/95.0" 192.168.45.251 - - [11/Jan/2022:17:12:31 +0600] "GET /index.php/ocs/v2.php/cloud/users/details?offset=0&search=&type=query&=1641913700847 HTTP/1.1" 302 1040 "-" "Mozilla/5.0 (X11; Linux x86_64; rv:95.0) Gecko/20100101 Firefox/95.0"

mtierltd commented 2 years ago

What database backend are you using? Please also share your nextcloud logfile.

jjanarnava commented 2 years ago

select @@version as version; = 8.0.25 - MySQL Community Server

Server: XX.XXX.XX.XXX via TCP/IP
Server-Typ: MySQL
Server-Version: 8.0.25 - MySQL Community Server - GPL
Protokoll-Version: 10
Server-Zeichensatz: cp1252 West European (latin1)

nothing related to the App in the log file...

jjanarnava commented 2 years ago

same with 0.0.73, "The results could not be loaded"

admorgan commented 2 years ago

Working for me on 0.0.73 with Postgres

upultfs commented 2 years ago

My database also Mysql 10.3.32, Time tracker - 0.0.73. and Nextcloud 22.2.0 Users not loading for me too. @mtierltd Is Time tracker runs on specific DB only?

mxc commented 2 years ago

I am using Postgres with 0.0.73 and have the issue reported. Here is an extract from the log file. I can't see any specific errors but hope it helps.

10.0.0.5 - - [19/Jan/2022:13:06:02 +0200] "PUT /index.php/apps/user_status/heartbeat HTTP/1.1" 200 6235 "-" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:93.0) Gecko/20100101 Firefox/93.0" 10.0.0.5 - - [19/Jan/2022:13:06:03 +0200] "GET /index.php/ocs/v2.php/cloud/users/details?offset=0&search=&type=query&=1642590342174 HTTP/1.1" 302 1040 "-" "Mozilla/5.0 (X11; Linux x86_64; rv:96.0) Gecko/20100101 Firefox/96.0" 10.0.0.5 - - [19/Jan/2022:13:06:04 +0200] "GET /index.php/ocs/v2.php/cloud/users/details?offset=0&search=&term=za&type=query&q=za&=1642590342175 HTTP/1.1" 302 1040 "-" "Mozilla/5.0 (X11; Linux x86_64; rv:96.0) Gecko/20100101 Firefox/96.0" 10.0.0.5 - - [19/Jan/2022:13:06:05 +0200] "GET /index.php/apps/dashboard/ HTTP/1.1" 200 13737 "-" "Mozilla/5.0 (X11; Linux x86_64; rv:96.0) Gecko/20100101 Firefox/96.0" 10.0.0.5 - - [19/Jan/2022:13:06:05 +0200] "GET /index.php/ocs/v2.php/cloud/users/details?offset=0&search=&term=zab&type=query&q=zab&=1642590342176 HTTP/1.1" 302 6295 "-" "Mozilla/5.0 (X11; Linux x86_64; rv:96.0) Gecko/20100101 Firefox/96.0" 10.0.0.5 - - [19/Jan/2022:13:06:06 +0200] "GET /index.php/apps/dashboard/ HTTP/1.1" 200 13739 "-" "Mozilla/5.0 (X11; Linux x86_64; rv:96.0) Gecko/20100101 Firefox/96.0" 10.0.0.5 - - [19/Jan/2022:13:06:05 +0200] "GET /ocs/v2.php/apps/notifications/api/v2/notifications HTTP/1.1" 304 309 "-" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:93.0) Gecko/20100101 Firefox/93.0" 10.0.0.5 - - [19/Jan/2022:13:06:07 +0200] "GET /index.php/ocs/v2.php/cloud/users/details?offset=0&search=&term=za&type=query&q=za&=1642590342177 HTTP/1.1" 302 1040 "-" "Mozilla/5.0 (X11; Linux x86_64; rv:96.0) Gecko/20100101 Firefox/96.0" 10.0.0.5 - - [19/Jan/2022:13:06:07 +0200] "GET /index.php/ocs/v2.php/cloud/users/details?offset=0&search=&term=zan&type=query&q=zan&=1642590342178 HTTP/1.1" 302 1040 "-" "Mozilla/5.0 (X11; Linux x86_64; rv:96.0) Gecko/20100101 Firefox/96.0" 10.0.0.5 - - [19/Jan/2022:13:06:08 +0200] "GET /index.php/apps/dashboard/ HTTP/1.1" 200 13738 "-" "Mozilla/5.0 (X11; Linux x86_64; rv:96.0) Gecko/20100101 Firefox/96.0"

mxc commented 2 years ago

Any news on this. Going to wade through the code and see if I can find anything.

mxc commented 2 years ago

If I run this command:

curl -u peter:pass -X GET -H "Accept: application/json" -H "OCS-APIRequest: true" 'https://cloud.example.com/ocs/v2.php/cloud/users/details?offset=0&search=za'

I get the expected json response back. All looks good. The URL in the web dev console when requesting from the app looks like this:

?offset=0&search=&term=za&_type=query&q=za'

If I use this url:

https://cloud.example.com/ocs/v2.php/cloud/users/details?offset=0&search=&term=za&_type=query&q=za

I get no results. Looks like the generated URL is wrong?

vx76 commented 2 years ago

Hello, any news about this problem?

NZNZ8 commented 2 years ago

Hi, I don't even get these options on the "edit project' pop-up. The projects are marked as Locked on the projects page, but I only see the options for Name, Color, Archive and Client when I try to edit a project. Update: Figured out how to get to the Users (only works as Admin), but can not add a User. So the issue is exactly as "denkwende" commented on Nov 4, 2021. Can anybody help? TimeTracker-UserIssue

mxc commented 2 years ago

This issue is still unresolved in the 0.0.74 release.

Elliot-Construct commented 2 years ago

I'm still experiencing this issue.

dbfischer commented 2 years ago

This issue is still unresolved in the 0.0.77 release. Just changed project names and now I can't assign a user to it like in the screenshots before.

dthomasdigital commented 1 year ago

This is still an Issue in 2023 0.0.77 release. Anyone find a work around. Tried setting up groups and just allowed groups, still no joy.

rg-thkoeln commented 1 year ago

This is really a major issue. I would offer a code bounty of 150€ if the issue get fixed. Anyone else feel free to join :)

mtierltd commented 1 year ago

I think this is an issue with your webserver's configuration. index.php should not be a part of the query:

/ocs/v2.php/cloud/users/details

vs

/index.php/ocs/v2.php/cloud/users/details

Now the timetracker app generates the URL for this query using OC.generateUrl:

url: OC.generateUrl('/ocs/v2.php/cloud/users/details')

So at this point I think that something in the webserver's configuration rewrites the URL incorrectly.

So someone who has this error please provide the complete webserver configuration of yours.

The configuration I use has this location entry:

location ~ ^/(?:index|remote|public|cron|core/ajax/update|status|ocs/v[12]|updater/.+|ocs-provider/.+)\.php(?:$|/) {

As you can see it will properly catch the ocs/v* queries and send them directly to php-fpm.

This is also what's in the official example nginx configuration in the nextcloud documentation as well https://docs.nextcloud.com/server/latest/admin_manual/installation/nginx.html

mxc commented 1 year ago

I am using apache2. Here is my config.

    <VirtualHost *:443>
            ServerName nextcloud.abc.co.za
            DocumentRoot /var/www/nextcloud
            SSLEngine on
            SSLCertificateFile /etc/letsencrypt/live/nextcloud.abc.co.za/fullchain.pem
            SSLCertificateKeyFile /etc/letsencrypt/live/nextcloud.abc.co.za/privkey.pem
            ErrorLog ${APACHE_LOG_DIR}/nextcloud-error.log
            CustomLog ${APACHE_LOG_DIR}/nextcloud-access.log combined
            Header always set Strict-Transport-Security "max-age=63072000; includeSubdomains;"
            timeout 600
            ProxyTimeout 600
            <Directory /var/www/nextcloud/>
              Options +FollowSymlinks
              AllowOverride All

             <IfModule mod_dav.c>
              Dav off
             </IfModule>
             SetEnv HOME /var/www/nextcloud
             SetEnv HTTP_HOME /var/www/nextcloud

            </Directory>
    </VirtualHost>
mxc commented 1 year ago

If I add the following to my Apache configuration the users are now listed.

                RewriteEngine on
                RewriteRule "/index.php/ocs/v2.php/cloud/users/details" "/ocs/v2.php/cloud/users/details"

I haven't tested this thoroughly to see if it causes any issues with other URLs in NextCloud so use at your own risk or at least report back here so we can see if the redirect can be refined. Will let people know if I find any issues. It seems to work so far.

PolyDK commented 1 year ago

Same here! Any news on this?