Skip to content

Undefined index: share_name at \/var\/www\/html\/owncloud\/lib\/private\/Share20\/DefaultShareProvider.php#863 #28285

Closed

Description

Steps to reproduce

  1. php occ files:scan --all
    OR
  2. check owncloud.log

Expected behaviour

There are a lot of errors in the log and the occ filescan doesn't work. A lot of errors. I think for some reason the share_name index isn't in the $data variable in the DefaultShareProvider.php (check line 863)

Actual behaviour

Tell us what happens instead

Server configuration

Operating system:
Cent OS 7 (7.3.1611)

Web server:
Apache 2.4.6

Database:
mysql 14.14 Distrib 5.6.36

PHP version:
php 5.6.30

ownCloud version: (see ownCloud admin page)
10.0.2 (stable)

Updated from an older ownCloud or fresh install:
from 9.1.2 (stable) (9.1.6 after update I think) to 10.0.2

Where did you install ownCloud from:
http://download.owncloud.org/download/repositories/10.0.2/CentOS_7/ce:10.0.repo

Signing status (ownCloud 9.0 and above):
"https://gist.github.com/dc75la/a23c6b866adce8ee1c45bc17c92ceb78"
(because of a bug with column length: 256 set to 255)

The content of config/config.php:
$CONFIG = array (
'instanceid' => '--scrambled--',
'passwordsalt' => '--scrambled--',
'trusted_domains' =>
array (
0 => '--scrambled--',
1 => '--scrambled--',
),
'datadirectory' => '/home/--scrambled--',
'overwrite.cli.url' => 'https://--scrambled--',
'dbtype' => 'mysql',
'version' => '10.0.2.1',
'installed' => true,
'mail_smtpmode' => 'sendmail',
'mail_smtphost' => '--scrambled--',
'mail_smtpport' => '25',
'mail_from_address' => '--scrambled--',
'mail_domain' => '--scrambled--',
'loglevel' => '0',
'mail_smtpauthtype' => '--scrambled--',
'maintenance' => false,
'secret' => '--scrambled--',
'theme' => '',
'updatechecker' => false,
'trashbin_retention_obligation' => 'auto, auto',
'dbname' => '--scrambled--',
'dbhost' => 'localhost:3306',
'dbuser' => '--scrambled--',
'dbpassword' => '--scrambled--',
// 'memcache.local' => '\OC\Memcache\APCu',
// );
'filelocking.enabled' => true,
'memcache.local' => '\OC\Memcache\Redis',
'memcache.locking' => '\OC\Memcache\Redis',
// 'memcache.local' => '\OC\Memcache\Redis',
'redis' => array(
'host' => '127.0.0.1',
'port' => 6379,
'timeout' => 0,
),
);

List of activated apps:
Enabled:

  • comments: 0.3.0
  • configreport: 0.1.1
  • dav: 0.2.9
  • federatedfilesharing: 0.3.0
  • federation: 0.1.0
  • files: 1.5.1
  • files_external: 0.7.0
  • files_pdfviewer: 0.8.2
  • files_sharing: 0.10.0
  • files_trashbin: 0.9.0
  • files_versions: 1.3.0
  • files_videoplayer: 0.9.8
  • firstrunwizard: 1.1
  • market: 0.1.0
  • provisioning_api: 0.5.0
  • systemtags: 0.3.0
  • templateeditor: 0.1
  • updatenotification: 0.2.1
    Disabled:
  • encryption
  • external
  • files_antivirus
  • notifications
  • theme-example
  • user_external

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

Are you using encryption: yes/no
no

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

Logs

Web server error log

no errors related to the share_name error

ownCloud log (data/owncloud.log)

A lot of {"reqId":"WUgLRmyBEqVmVQy7zQ1zkwAAAAw","level":3,"time":"2017-06-19T17:35:02+00:00","remoteAddr":"--scrambled--","user":"--scrambled--","app":"PHP","method":"PROPFIND","url":"/owncloud/remote.php/dav/files/--scrambled--/","message":"Undefined index: share_name at /var/www/html/owncloud/lib/private/Share20/DefaultShareProvider.php#863"}
Messages

Activity

  1. PVince81 commented on Jul 3, 2017

    @PVince81
    Contributor

    can you check that the column "oc_share.name" does exist ?

  2. PVince81 commented on Jul 3, 2017

    @PVince81
    Contributor

    So there's your problem.

    The column should have been created when updating to 10.0.2. How did you update ?

    The migration in question is class Version20170320173955. You can check the oc_migrations table to
    see whether it runs.

    You could also try running occ migrations:migrate core to run missing migrations, just in case.

  3. PVince81 commented on Jul 17, 2017

    @PVince81
    Contributor

    there is currently no way to check for a full integrity of the database because with the migrations approach, there is no full definition of the DB schema.

    The main question here is why this one migration didn't run for you guys in the first place.

    Can you guys do a select * from oc_migrations where version='20170320173955'; ?
    If the oc_share.name column is missing, then the migration entry above should be missing too.
    If the column exists, the migration should be there.

    The upgrade code decides what migrations to run based on what's in that oc_migrations table, so the mystery so far is why it decided to not run it.

    cc @DeepDiver1975

  4. hdijkema commented on Aug 24, 2017

    @hdijkema

    I had the same problem after upgrading from 7.0 -> 8.0 -> 8.1 -> (...) -> 10.0.

    migrations:execute core 20170320173955

    solved my problem too.

  5. added this to the development milestone on Sep 5, 2017
  6. added
    p1-urgent
    on Sep 5, 2017
  7. VicDeo commented on Sep 5, 2017

    @VicDeo
    Contributor

    @hdijkema could you please recall the exact version you had before 10.0 in your upgrade path?

  8. 35 remaining items

  9. added this to the development milestone on Feb 13, 2018
  10. ownclouders commented on Mar 24, 2018

    @ownclouders
    Contributor

    Hey, this issue has been closed because the label status/STALE is set and there were no updates for 7 days. Feel free to reopen this issue if you deem it appropriate.

    (This is an automated comment from GitMate.io.)

  11. PVince81 commented on Mar 26, 2018

    @PVince81
    Contributor

    Please note that reverting the OC code to an older version without reverting the database to said version is not supported. The database needs to be in the previous pre-upgrade state when rolling back.

    If the problem happened for you the first time without any rollback, please reopen.

  12. voroyam commented on May 14, 2018

    @voroyam
    Contributor

    Error reported again on central:

    OS: Gentoo
    ownCloud Update: upgrade through package-manager
    PHP 7.1
    Apache2

    Doctrine\DBAL\Schema\SchemaException: 
    There is no column with name 'fileid' on table 'oc_properties'.
    Update failed
    

    https://central.owncloud.org/t/upgrade-from-9-x-to-10-0-7-fail-there-is-no-column-with-name-fileid-on-table-oc-properties/12837

    copied from this #29061 (comment)
    becaus it's closed

  13. modified the milestones: 10.0.8, backlog on Jun 11, 2018
  14. ownclouders commented on Jul 20, 2018

    @ownclouders
    Contributor

    Hey, this issue has been closed because the label status/STALE is set and there were no updates for 7 days. Feel free to reopen this issue if you deem it appropriate.

    (This is an automated comment from GitMate.io.)

  15. lock commented on Jul 30, 2019

    @lock

    This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

  16. locked as resolved and limited conversation to collaborators on Jul 30, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bug-analysisp2-highsev3-mediumstatus/STALE

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions