If you open either of the Demco label templates (loaded by the sample data) and click "save" without making any changes you will get an error: Can't bless non-reference value at C4/Creators/Profile.pm line 92.
Confirmed, it comes from installer/data/mysql/en/optional/sample_creator_data.sql It inserts a row into creator_templates with profile_id=13, but no printers_profile is inserted with this profile_id. Chris, could you have a look please?
Created attachment 37976 [details] [review] Bug 10222 - Error when saving Demco label templates This patch fixes a bug whereby if you open either of the Demco label templates (loaded by the sample data) and click "save" without making any changes you will get an error: Can't bless non-reference value at C4/Creators/Profile.pm line 92. It also fixes another minor bug in the creator sample data. To test: 1. Install all sample data in a clean database. 2. In the label tool, edit either of the Demco label templates. 3. Save the template and observe the error mentioned above. 4. Drop and recreate the database. 5. Apply the patch. 6. Repeate steps 1-3 and note the successful save.
Comment on attachment 37976 [details] [review] Bug 10222 - Error when saving Demco label templates Review of attachment 37976 [details] [review]: ----------------------------------------------------------------- ::: installer/data/mysql/en/optional/sample_creator_data.sql @@ +27,4 @@ > > LOCK TABLES `printers_profile` WRITE; > /*!40000 ALTER TABLE `printers_profile` DISABLE KEYS */; > +INSERT INTO `printers_profile` VALUES (1,'Library Laser',1,'Bypass',-2,9,3,0,'POINT','Labels'),(13,'Library Laser',7,'Tray 1',0,0,0,0,'POINT','Labels'),(14,'Library Laser',12,'Tray 2',0,0,0,0,'POINT','Labels'),(16,'Test Printer 01',23,'Test Bin',0,0,0,0,'POINT','Patroncards'),(22,'Library Laser',0,'Tray 3',0,0,0,0,'POINT','Labels'); Why remove 11? Why are the columns not explicitly named? Also, perhaps splitting lines for human readability might be an idea. And maybe INSERT IGNORE?
(In reply to M. Tompsett from comment #3) > Why remove 11? Because it was a mistake from the beginning. (I wrote the original, btw.) > Why are the columns not explicitly named? Why should they be named? > And maybe INSERT IGNORE? No need. This is only executed upon a fresh install. Why switch this back to "Needs Signoff?" Did you test it and have it fail?
1/ The change should be done for all languages. 2/ I also think it could be better to name the column, to prevent further changes to this table (add new column?) Marked as Failed QA for 1.
Confirmed issue still exists.
Created attachment 68410 [details] [review] Bug 10222 - Error when saving Demco label templates This patch fixes a bug whereby if you open either of the Demco label templates (loaded by the sample data) and click "save" without making any changes you will get an error: Can't bless non-reference value at C4/Creators/Profile.pm line 92. It also fixes another minor bug in the creator sample data. To test: 1. Install all sample data in a clean database. 2. In the label tool, edit either of the Demco label templates. 3. Save the template and observe the error mentioned above. 4. Drop and recreate the database. 5. Apply the patch. 6. Repeate steps 1-3 and note the successful save. Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Created attachment 68411 [details] [review] Bug 10222: Correct and expand to other languages This added column names, and reformated to be a bit more readable. This also adds this change to de-DE, es-ES, fr-CA, and nb-NO. While there was printer_profiles for it-IT, the Italian file seems to not use the same numbers, and does not visibly look like it needs these changes. Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signing off on these, noticing that ru-RU and uk-UA are missing. There don't seem to be any printer definitions in those files. Shall I fill a separate bug?
Created attachment 68801 [details] [review] Bug 10222 - Error when saving Demco label templates This patch fixes a bug whereby if you open either of the Demco label templates (loaded by the sample data) and click "save" without making any changes you will get an error: Can't bless non-reference value at C4/Creators/Profile.pm line 92. It also fixes another minor bug in the creator sample data. To test: 1. Install all sample data in a clean database. 2. In the label tool, edit either of the Demco label templates. 3. Save the template and observe the error mentioned above. 4. Drop and recreate the database. 5. Apply the patch. 6. Repeate steps 1-3 and note the successful save. Signed-off-by: Mark Tompsett <mtompset@hotmail.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Created attachment 68802 [details] [review] Bug 10222: Correct and expand to other languages This added column names, and reformated to be a bit more readable. This also adds this change to de-DE, es-ES, fr-CA, and nb-NO. While there was printer_profiles for it-IT, the Italian file seems to not use the same numbers, and does not visibly look like it needs these changes. Signed-off-by: Mark Tompsett <mtompset@hotmail.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
(In reply to Katrin Fischer from comment #9) > Signing off on these, noticing that ru-RU and uk-UA are missing. There don't > seem to be any printer definitions in those files. Shall I fill a separate > bug? A separate bug yes. But I am not sure whether you need to file one. Considering, wouldn't people using those languages have complained about it, if they used them?
I think that's a false logic and at least one of those languages had a recent update.
Created attachment 69133 [details] [review] Bug 10222 - Error when saving Demco label templates This patch fixes a bug whereby if you open either of the Demco label templates (loaded by the sample data) and click "save" without making any changes you will get an error: Can't bless non-reference value at C4/Creators/Profile.pm line 92. It also fixes another minor bug in the creator sample data. To test: 1. Install all sample data in a clean database. 2. In the label tool, edit either of the Demco label templates. 3. Save the template and observe the error mentioned above. 4. Drop and recreate the database. 5. Apply the patch. 6. Repeate steps 1-3 and note the successful save. Signed-off-by: Mark Tompsett <mtompset@hotmail.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Created attachment 69134 [details] [review] Bug 10222: Correct and expand to other languages This added column names, and reformated to be a bit more readable. This also adds this change to de-DE, es-ES, fr-CA, and nb-NO. While there was printer_profiles for it-IT, the Italian file seems to not use the same numbers, and does not visibly look like it needs these changes. Signed-off-by: Mark Tompsett <mtompset@hotmail.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Pushed to master for 18.05, thanks to everybody involved!
Pushed to stable for 17.11.01, awesome work all!
Pushed to 17.05.x, will be in v17.05.07