⚠ In case you've missed it, we have migrated to our new website, with a brand new forum. For more details about the migration you can read our blog post for website migration. This is an archived forum. ⚠

  •     

profile picture

An error has occurred on saving.



mjota

mjota
  • profile picture
  • Member

Posted 09 October 2017 - 04:19 AM

Hello,

 

I set up a n-n relation and every time I hit edit or save it keeps displaying. "An error has occurred on saving."

 

Next to the cancel button it also says "Loading, updating changes...".

 

Any ideas?

 

Thank you very much.


Amit Shah

Amit Shah
  • profile picture
  • Member

Posted 09 October 2017 - 10:08 AM

check the output of the request in the developer console of the browser.. see @the output if u get any .. or handle the debugging of CI @config.php / database.php ...

You should be able to identify the outcome of whatever the issue is.

 

Happy GCing:)


mjota

mjota
  • profile picture
  • Member

Posted 09 October 2017 - 10:47 AM

Hello Amit,

 

Thank you for your fast reply.

 

I am a newbie, could please explain me how can I see the request in the developer console of Firefox? For me it is blank.

I changed production to environment @ database.php and I also set $config['log_threshold'] = 4; but nothing appears when I hit Save, just the same error message.

 

Thank's in advance.


mjota

mjota
  • profile picture
  • Member

Posted 09 October 2017 - 15:57 PM

Hello.

 

I am getting this msg:

Query error: Duplicate entry '3' for key 'piloto_id' - Invalid query: INSERT INTO `vuelos_pilotos` (`vuelo_id`, `piloto_id`, `priority`) VALUES ('30', '3', 0)

mjota

mjota
  • profile picture
  • Member

Posted 09 October 2017 - 16:06 PM

Solved! 

I removed the relation I created in the designer of PhpMyAdmin and now it works. I guess that the designer did something weird like creating unique fileds or something


Amit Shah

Amit Shah
  • profile picture
  • Member

Posted 12 October 2017 - 17:25 PM

Yes,

 

the duplicate key was indicating primary key violation. Well.. happy that you solved your issue.

 

Happy Debugig there :)