Jump to content

[SOLVED] An error occurred while creating object. profile (Duplicate entry '5-1' for key 1)


Recommended Posts

Hi everyone,

 

I just created some employees (or atleast tried to) but I keep getting the same error, where the 5 corresponds to the profile ID (so far I've had 2, 3, 4 and 5).

 

An error occurred while creating object. profile (Duplicate entry '5-1' for key 1)

 

If I then associate an employee to the profile, they get displayed an internal 500 server error when they try to log in.

 

Does anyone know what is causing this and how to fix it please?

 

Thanks in advance.

Link to comment
Share on other sites

You might want to look in the database and check the ps_employee and ps_employee shop table if there is something weird, maybe delete some profiles there and see if this fixes the error.

Best regars, trip

Link to comment
Share on other sites

Thanks for the tip, I don't really know what I'm looking for though.

 

ps_employee seems to be the same as on another install I have for 1.4.8 (not sure if that should be the case as the new shop is 1.5.2), other than the value for "Cardinality", but again have no idea what that actually does.

 

ps_employee doesnt exist in my 1.4.8 database.

 

I did also look at the ps_profile, and ps_profile_lang just incase, but cant figure it out.

 

I will attach screenshots of those tables of the database below to see if someone can shed some light on this or maybe compare to their own database tables, as it's driving me nuts.

post-207773-0-72295600-1368534906_thumb.jpg

post-207773-0-04882100-1368534931_thumb.jpg

post-207773-0-77707500-1368534975_thumb.jpg

post-207773-0-85565000-1368534996_thumb.jpg

Link to comment
Share on other sites

You only show us the structure. The values might interesting so if possible show what you see when you click on the browse tab.

If this is confident you maybe paint black names and email adresses. But as said, first I would try to delete the last profiles from ps_employee and ps_employee shop and see if that fixes the problem but please on you local test installation ;) and not on the live server :)

Link to comment
Share on other sites

Hi Trip,

 

I have no idea what happened, but it now works. LIke I said I'm not super with databases, so I blocked out the server address just in case :wacko:

 

I just managed to add a new permissions profile and employee and it all works. I have no clue as to why though. Guess it will remain a mystery as I've not removed anything.

 

Thanks for the help though, I'll keep an eye on it to see if it comes back.

Edited by sshare (see edit history)
Link to comment
Share on other sites

  • 3 years later...

Duplicate entry '222-0-1' for key 'PRIMARY'

 

INSERT INTO `hook_module` (`id_module`, `id_shop`, `id_hook`, `position`)

                                    VALUES (222, 1, 0, 1)

 

 

BLANK WHITE BO

 

Debug Error

 

Notice: Undefined property: stdClass::$smarty in /home1/sworld/public_html/wholesalestationery.in/classes/module/Module.php on line 2330

Fatal error: Call to a member function createTemplate() on a non-object in /home1/sworld/public_html/wholesalestationery.in/classes/module/Module.php on line 2330

Link to comment
Share on other sites

×
×
  • Create New...