Duplicate entry 'myprofile' for key 'mdl_bloc_nam_uix'

Duplicate entry 'myprofile' for key 'mdl_bloc_nam_uix'

by L B -
Number of replies: 1

Hi all

I am trying to install the latest version of Moodle, but am having some issues. Any tips on how to fix the Duplicate entry 'myprofile' for key 'mdl_bloc_nam_uix' error message would be greatly appreciated.

I started off with

  • xampp-win32-1.8.3-5-VC11-installer
  • bitnami-moodle-2.7.1-0-module-windows-installer

After being taken to http://localhost/moodle/admin/index.php I was presented with a page displaying the following:

Number of plugins requiring your attention: 251

I then scrolled down the bottom of the page and clicked "Upgrade Moodle database now" button.

I was then presented with the following error message?

Upgrading to new version

block_myprofile

Error writing to database

More information about this error

It is usually not possible to recover from errors triggered during installation, you may need to create a new database or use a different database prefix if you want to retry the installation.

Debug info: Duplicate entry 'myprofile' for key 'mdl_bloc_nam_uix'
INSERT INTO mdl_block (cron,name) VALUES(?,?)
[array (
0 => 0,
1 => 'myprofile',
)]
Error code: dmlwriteexception
Stack trace:
  • line 446 of \lib\dml\moodle_database.php: dml_write_exception thrown
  • line 1098 of \lib\dml\mysqli_native_moodle_database.php: call to moodle_database->query_end()
  • line 1144 of \lib\dml\mysqli_native_moodle_database.php: call to mysqli_native_moodle_database->insert_record_raw()
  • line 858 of \lib\upgradelib.php: call to mysqli_native_moodle_database->insert_record()
  • line 422 of \lib\upgradelib.php: call to upgrade_plugins_blocks()
  • line 1615 of \lib\upgradelib.php: call to upgrade_plugins()
  • line 434 of \admin\index.php: call to upgrade_noncore()





Average of ratings: -
In reply to L B

Re: Duplicate entry 'myprofile' for key 'mdl_bloc_nam_uix'

by L B -

Anyone? shy