-
Notifications
You must be signed in to change notification settings - Fork 173
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
(New Global) Search URL broken for contacts app #1852
Comments
FYI contacts app in use is v 3.4.0 |
Yes, it is broken when pretty url is not enabled (aka showing index.php) :) It seems to be related to the php function used to generate the route https://github.com/nextcloud/server/blob/2a054e6c04e0a40421510eb889cbf59f153c5177/apps/dav/lib/Search/ContactsSearchProvider.php#L184-L188 |
have the same issue: BROKEN: I have fixed it by changing in: |
@octavsly you should probably configure your nextcloud server correctly so it supports pretty urls :) |
Thank you. I have changed it to
Then run |
For anyone else doing this in the future @octavsly has the right idea, just don't forget to run this command once you update your config.php: sudo -u www-data php /var/www/nextcloud/occ maintenance:update:htaccess until you do that, your change won't work. It's in the documentation that @skjnldsv posted. |
Just for my understanding: Does this bug in fact making pretty-urls mandantory if you want to use contacts app? |
Kind of :) |
Short info/notice: problem still existed in 20.0.2 released today... ... until i edited my config like mentioned above and updated the (with occ maintenance:update:htaccess) Thanks for the hint! Works like intended now :-) |
This comment has been minimized.
This comment has been minimized.
I did the same modifications without any fix. Using docker with nginx. Can we say that this htaccess method is also applicable to nginx. Editing apps/contacts/lib/Controller/ContactsController.php worked. |
what did you do? |
Applied octavsly's method: Only the above worked for me. |
I need to check if that is ok for people with nice urls, thanks for sharing |
For me, even with pretty urls enabled, I am still seeing this bug. It displayed an error message 'Contact not found' when clicking on a contact in the search results. Patching 'apps/contacts/lib/Controller/ContactsController.php' didn't solve the problem but the error message 'Contact not found' was no longer displayed. |
COuld be an url encode problem. There is another deeper issue that exists since a few version. |
I had the same issue on my 2 instances after upgrading to NC20. |
That's to be expected, given the URL that I see in the address bar dafter clicking a contact search result. BUT alas the docs on supporting Pretty URls are sadly shallow. Shallow in that they provide a occ command that does nothing on my system (and hence I'd love to find out where the source code for a given occ command resides so I can diagnose), but that aside all I can hope the occ command does for me is append to the sites root directory .htaccess file, an Apache syntax set of instructions for redirects. Which is a good start, but it would be so so much nicer for those of us who don't use Apache (and that is no small group of people in 2002 given nginx and lightpd kick Apache's ass performance and resource wise) if the docs provided a lucid plain English summary of the URLs that need to be rewritten (as it's fairly easy with any webserver to insert index.php into URLs that lack it, but done universally is going to break all the URLs that Nextcloud uses that don't have index.php in them and so what's needs is a list of used NextCloud paths known to be served by index.php and a list that it uses that are known not to be - remote.php and static files spring immediately to mind). So I can not right now even see the Apache instructions let alone begin to decrypt their intent for re-implementation in nginx or lighttpd. All of which is a heck of a rigmarole just because the Contacts app does not abide by Nextcloud norms and generates invalid URLs. To be honest, I could probably write one line config to accept contacts app URLs that are broken and rewrite them ... |
As I said in my previous comment, the workarounds didn't work for me. Here is what happens in the Firefox console when I try to access a contact with the URL generated by the unified search. URL generated by the unified search : Firefox console output (edited):
As you can see in the last URL, suddenly Contacts Apps try to access a contact whose id is Hope it helps. |
@FredericLespez what is the name of the addressbook of this contact? |
@skjnldsv The name of the address book is "Contacts Communs". |
Seems to be a correct url. Whave you tried with index.php ? |
@skjnldsv Even with index.php, it doesn't work ("Contact not found"). |
From my side exactly the same Nextcloud-Version 20.0.3 |
Steps to reproduce
Expected behaviour
contact details should be shown, of course :-)
Actual behaviour
HTTP/404. It seems to me, that final URL is malformed:
CURRENT: "https://hostname/apps/contacts/...."
instead of "https://hostname/index.php/apps/contacts/..."
Tried to add the missing .../index.php/... part manually in Browser's URL field, works, contact details are shown
Server configuration detail
Operating system: Linux 5.3.18-lp152.44-default #1 SMP Wed Sep 30 18:51:43 UTC 2020 (914f31e) x86_64
Webserver: Apache (apache2handler)
Database: mysql 10.4.14
PHP version:
7.4.6
Modules loaded: Core, date, libxml, pcre, filter, hash, Reflection, SPL, session, SimpleXML, standard, xml, mysqlnd, apache2handler, apcu, bcmath, bz2, ctype, curl, dom, mbstring, fileinfo, ftp, gd, gettext, gmp, iconv, imagick, intl, json, ldap, exif, mysqli, openssl, pcntl, PDO, pdo_mysql, pdo_sqlite, zlib, posix, soap, sockets, sqlite3, tokenizer, xmlreader, xmlwriter, zip, Phar, Zend OPcache
Nextcloud version: 20.0.0 - 20.0.0.9
Updated from an older Nextcloud/ownCloud or fresh install: updated regularily, base was OwnCloud long ago
Where did you install Nextcloud from: RPM from OpenSUSE repos
Signing status
Array
(
)
List of activated apps
Configuration (config/config.php)
Are you using external storage, if yes which one:
Are you using encryption: 1
Are you using an external user-backend, if yes which one:
Client configuration
Browser: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Firefox/78.0
Operating system: OpenSUSE Leap 15.2
Logs
Web server error log
Nextcloud log
Browser log
out of scope
The text was updated successfully, but these errors were encountered: