Search for files that are not in subfolder of current folder causes infinite URL switching #23774

michaelstingl opened this Issue Apr 4, 2016 · 13 comments


None yet

7 participants



Steps to reproduce

  1. create folders subfolder-testing > searchthis
  2. go to "Shared with you" folder
  3. search for searchthis
  4. click on result in "search results in other folders" list

Expected behaviour

see search result

Actual behaviour

infinite URL switching

Server configuration

Operating system:
Ubuntu 14.04

Web server:

mysql Ver 15.1 Distrib 5.5.47-MariaDB

PHP version:
PHP 5.5.9-1ubuntu4.14

ownCloud version: (see ownCloud admin page)
ownCloud 8.2.3 ee

Updated from an older ownCloud or fresh install:
fresh install

List of activated apps:

  - activity: 2.1.4
  - admin_audit: 0.6
  - enterprise_key: 0.1.0
  - external: 1.2
  - files: 1.2.1
  - files_drop: 0.4
  - files_external: 0.3.0
  - files_pdfviewer: 0.7
  - files_sharing: 0.7.0
  - files_sharing_log: 0.5
  - files_texteditor: 2.0
  - files_trashbin: 0.7.0
  - files_versions: 1.1.0
  - files_videoviewer: 0.1.3
  - firewall: 2.2.0
  - firstrunwizard: 1.1
  - gallery: 14.2.0
  - notifications: 0.1.0
  - password_policy: 
  - provisioning_api: 0.3.0
  - templateeditor: 0.1
  - updater: 0.6
  - user_ldap: 0.7.1
  - windows_network_drive: 0.1.1
  - encryption
  - files_antivirus
  - files_ldap_home
  - objectstore
  - sharepoint
  - user_external
  - user_shibboleth

The content of config/config.php:

nothing modified

Are you using external storage, if yes which one: local/smb/sftp/...

Are you using encryption: yes/no

Are you using an external user-backend, if yes which one: LDAP/ActiveDirectory/Webdav/...

Client configuration

Safari 9.1

Operating system:
Mac OS X 10.11.4

@MorrisJobke Who can help here?



Might be to the redirect loop from the apps page?


This looks like a bug in the redirect from the shared with you section to the all files section. Maybe somebody from @owncloud/javascript could have a look.


I got the same problem with the actual owncloud Version 9.0
The issue also shows up in the online-demo:
Just search for a file and then klick on a serch result - you will be just redirected to the startpage.

blizzz commented Apr 14, 2016

Possible reason: if a change dir does not work, the attempt is to go back:


@MorrisJobke Any news?



Possible reason: if a change dir does not work, the attempt is to go back

but that only kicks in in case of server error or 404

blizzz commented Apr 18, 2016

Possible reason: if a change dir does not work, the attempt is to go back

but that only kicks in in case of server error or 404

so you maybe end up in a chain? speculation, this needs debugging.


@blizzz @PVince81 @MorrisJobke What is the status here?

PVince81 commented May 9, 2016

I suspect that the result's URL is wrong and pointing at a non-existing folder, which might trigger this recursive error.

In general, we need to find a way to prevent switching back and forth and just stop. Still haven't gotten to the bottom of it.

Setting to 9.1 to investigate.

@PVince81 PVince81 added this to the 9.1-current milestone May 9, 2016

My prediction says when we pass parameters as view=favorites, view=sharingin, view=sharingout and view=sharinglinks in URL. this turns into repetitive loading of the page. so problem around search.js or filelist.js

filelist.js following function stucks and reload page:

changeDirectory: function(targetDir, changeUrl, force, fileId) {
            var self = this;
            var currentDir = this.getCurrentDirectory();
            targetDir = targetDir || '/';
            if (!force && currentDir === targetDir) {
            this._setCurrentDir(targetDir, changeUrl, fileId);
                if (!success) {
                    self.changeDirectory(currentDir, true);

parameters changeURL and force value in normal case is true but in this loop case it is undefined.
I am not expert of javascript but my this prediction can help someone for further prediction.


Fix is here #25259


@PVince81 Thanks! Could this be backported to stable9 and stable8.2?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment