Moodle

Upgrading error: repository/flickr_public/db/access.php needs to be fixed.

Details

  • Type: Bug Bug
  • Status: Closed Closed
  • Priority: Critical Critical
  • Resolution: Fixed
  • Affects Version/s: 2.0
  • Fix Version/s: None
  • Component/s: Repositories
  • Labels:
    None
  • Difficulty:
    Easy
  • Affected Branches:
    MOODLE_20_STABLE

Description

To avoid Moodle installing and upgrading error, we need to fix repository/flickr_public/db/access.php as below.

File to be fixed: repository/flickr_public/db/access.php
line: 5

[before]
$repository_flickr_public_capabilities = array(
'repository/flickr:view' => array(

[after]
$repository_flickr_public_capabilities = array(
'repository/flickr_public:view' => array(

[Moodle upgrading error message ] -------------------------------------------------------------------------
repository_flickr_public

Error writing to database

More information about this error
Duplicate entry 'repository/flickr:view' for key 2

INSERT INTO mdl_capabilities (name,captype,contextlevel,component,riskbitmask) VALUES(?,?,?,?,?)
[array ( 'name' => 'repository/flickr:view', 'captype' => 'read', 'contextlevel' => 10, 'component' => 'repository_flickr_public', 'riskbitmask' => 0, )]
Stack trace:

  • line 365 of \lib\dml\moodle_database.php: dml_write_exception thrown
  • line 663 of \lib\dml\mysqli_native_moodle_database.php: call to moodle_database->query_end()
  • line 719 of \lib\dml\mysqli_native_moodle_database.php: call to mysqli_native_moodle_database->insert_record_raw()
  • line 3327 of \lib\accesslib.php: call to mysqli_native_moodle_database->insert_record()
  • line 364 of \lib\upgradelib.php: call to update_capabilities()
  • line 1078 of \lib\upgradelib.php: call to upgrade_plugins()
  • line 252 of \admin\index.php: call to upgrade_noncore()

Activity

Hide
Dongsheng Cai added a comment -

Hi, Mitsuhiro
Thanks a lot for reporting, fixed

Show
Dongsheng Cai added a comment - Hi, Mitsuhiro Thanks a lot for reporting, fixed
Hide
Mitsuhiro Yoshida added a comment -

Hi Dongsheng,

Thank you very much for the quick fix.

Mits

Show
Mitsuhiro Yoshida added a comment - Hi Dongsheng, Thank you very much for the quick fix. Mits
Hide
Mitsuhiro Yoshida added a comment -

Fixed in CVS.

Show
Mitsuhiro Yoshida added a comment - Fixed in CVS.

People

Vote (0)
Watch (0)

Dates

  • Created:
    Updated:
    Resolved: