Closed marisastrong closed 6 years ago
This error could be occurring due to an Unique Index 'index_settings_on_target_type_and_target_id_and_var' on the Settings table that prevents duplicate entry . That index has been dropped currently and migration scripts are updated to prevent future errors.. Let me know if you notice it again.
@bhavi - I can download most of my plans on dev and stage. So far two that caused (different) errors on dmptool-dev are:
1 - Details for plans that threw errors (first and last plan in list)
2 - No Method error for USGS DMP Template
https://dmptool-dev.cdlib.org/plans/1265/download - this is no longer causing an error in dev as originally reported.
for the USGS template I get the same No Method error for text format only. All other file formats work. https://dmptool-dev.cdlib.org/plans/31292/download
for the DMP Template from DCC I still get "Bad Gateway" if I try to download any format https://dmptool-dev.cdlib.org/plans/31310/download
This should be ok now. I'm not able to replicate the Bad Gateway error. I think it may just be a glitch with the dev data. I've tested several plans based on the DCC template in stage with no issues
yes the USGS is fixed! i won't worry about the other one since it's difficult to distinguish bad data from bugs at this point.
Bad Gateway usually happens when the server is unable to respond to the request. I think the DCC one may even have been a situation where you tried to access it while the site was being restarted. Did it happen multiple times or just once? We can verify this afternoon once the migration has been run on stage.
i've tested it about 10 times now over a few days and it happens every time. will test again post migration. it could just be bad data. i'm not too worried about it since it's just that one plan and other created with the same template are ok.
https://dmptool-dev.cdlib.org/plans/1265/download - this isn't occurring in stage
When I try to export a plan I receive an error
ActiveRecord::RecordNotUnique in PlansController#export Mysql2::Error: Duplicate entry 'ExportedPlan-265-export' for key 'index_settings_on_target_type_and_target_id_and_var': INSERT INTO
settings
(value
,var
,target_type
,target_id
,created_at
,updated_at
) VALUES ('---\nformatting:\n :margin:\n :top: 25\n :bottom: 20\n :left: 12\n :right: 12\n :font_face: Arial, Helvetica, Sans-Serif\n :font_size: 10\nmax_pages: 3\nfields:\n :admin:\n - project_name\n - project_identifier\n - grant_title\n - principal_investigator\n - project_data_contact\n - project_description\n - funder\n - institution\n - orcid\n :questions: :all\ntitle: \'\'\n', 'export', 'ExportedPlan', 265, '2018-02-23 16:19:54', '2018-02-23 16:19:54')