Flowing on from my previous question about writing my first component (now called com_picture) which is nearly an exact clone of the com_contact directory, I have hit a snag with trying to save a new "picture" with a tag.
When I save a picture without a value in the tags field, everything is sweet.
However, when I try to save a picture with a value in the tags field (I mean the cute little blue bubble with the tag value is generated in the tags field in the lower right of the window), I receive a vague/useless bootstrap error:
Error Save failed with the following error:
If I make changes to the Name, Alias, Category, Language, etc. -- all of those changes are preserved after I click save. It is ONLY the tags field that is failing.
I have set my Global Configuration - Server - Error Reporting to: "Development" and read through all of the queries, but there are no INSERT queries (which I expected to see when adding a new tag) and the 2 UPDATE queries are not relating to the tag table. Basically, there are no clues in the 37 queries logged.
If anyone, for some uncanny reasons, actually knows what I've done wrong please share. Otherwise, I'm merely asking how I can generate some informative error messages/clues as to what I've done wrong.
As a bit more background, I've cloned the com_contact directory then done a case-sensitive replacement on all occurrences of contact
, Contact
, and CONTACT
with picture
, Picture
, and PICTURE
-- this was the simplest way forward for this prototype because it seamlessly handled singular/plural versions of the keyword for filenames, classes, functions, variables, etc. I also copied and adjusted all rows in all tables (I believe) which refer to com_contact so that com_picture is represented and all ids are pointing to the correct rows.
And in case it helps to dismiss some suspicions, I am able to generate a full error message when I try to save a duplicate picture in the same category:
Error Save failed with the following error: Another Picture from this category has the same alias (remember it may be a trashed item).
So I am thinking that this eliminates the possibility that I've overlooked a language .ini file. (maybe / maybe not)
I am running Joomla 3.8.12 I am happy to implement any wild guesses so that I can move forward.
I have already updated the #__content_types
table by copying the Contact row and making contact
-> picture
replacements.
(15, 'Picture Category', 'com_picture.category', '{"special":{"dbtable":"#__categories","key":"id","type":"Category","prefix":"JTable","config":"array()"},"common":{"dbtable":"#__ucm_content","key":"ucm_id","type":"Corecontent","prefix":"JTable","config":"array()"}}', '', '{"common":{"core_content_item_id":"id","core_title":"title","core_state":"published","core_alias":"alias","core_created_time":"created_time","core_modified_time":"modified_time","core_body":"description", "core_hits":"hits","core_publish_up":"null","core_publish_down":"null","core_access":"access", "core_params":"params", "core_featured":"null", "core_metadata":"metadata", "core_language":"language", "core_images":"null", "core_urls":"null", "core_version":"version", "core_ordering":"null", "core_metakey":"metakey", "core_metadesc":"metadesc", "core_catid":"parent_id", "core_xreference":"null", "asset_id":"asset_id"}, "special":{"parent_id":"parent_id","lft":"lft","rgt":"rgt","level":"level","path":"path","extension":"extension","note":"note"}}', 'PictureHelperRoute::getCategoryRoute', '{"formFile":"administrator\\/components\\/com_categories\\/models\\/forms\\/category.xml", "hideFields":["asset_id","checked_out","checked_out_time","version","lft","rgt","level","path","extension"], "ignoreChanges":["modified_user_id", "modified_time", "checked_out", "checked_out_time", "version", "hits", "path"],"convertToInt":["publish_up", "publish_down"], "displayLookup":[{"sourceColumn":"created_user_id","targetTable":"#__users","targetColumn":"id","displayColumn":"name"},{"sourceColumn":"access","targetTable":"#__viewlevels","targetColumn":"id","displayColumn":"title"},{"sourceColumn":"modified_user_id","targetTable":"#__users","targetColumn":"id","displayColumn":"name"},{"sourceColumn":"parent_id","targetTable":"#__categories","targetColumn":"id","displayColumn":"title"}]}');