I am wondering how hard it would be to patch a 3.18.8 system with the new option to disable showing the cascade value option in asset builders and Simple edit? What is a large fix in the code? Or could someone let me know which files need to be changed?
I am very comfortable changing the code, so even if I knew the files that were updated I could dig around.
Thanks!
There is a non-code change hack, whereby you use Metadata Schemas instead of individual values. Because schemas can be cascaded, you can use the default value to essentially cascade that value. This won't work in all situations, but may work in yours.
Daniel, I think that you misunderstood me, sorry about that.
I was referring to the new feature in 3.20.1 that allows you to REMOVE the cascade value checkbox, as it currently makes all of our asset builders look strange because they now have a cascade value checkbox next to metadata fields. The feature is the one that can now be configured on the details screen of a simple edit layout asset.
Whoops! I certainly did
You meant this one:
http://matrix.squiz.net/developer/changelogs/3.20.x/3.20.0rc1-3.20.0
[quote]Simple Edit Layout option to control display of "Cascade Value" metadata field checkbox
A switch has been added to the "Details" screen of Simple Edit Layouts to control the display of the "Cascade value" checkbox next to Metadata Fields.
This option controls display when in Simple Edit or on the frontend of assets such as Account Manager and Asset Builder when a customised Layout is applied. This checkbox will always be displayed on the backend.[/quote]
[quote]Whoops! I certainly did
You meant this one:
http://matrix.squiz.net/developer/changelogs/3.20.x/3.20.0rc1-3.20.0[/quote]
Yes, this “Simple Edit Layout option to control display of “Cascade Value” metadata field checkbox” feature. I am wondering how much code changes that was, and if someone could point me in the right direction…
The changes are in the 3.20.0 released versions of the following files:
core/assets/layout
asset.xml
edit_interface_screen_details.xml
layout.inc
layout_edit_fns.inc
layout_management.inc
locale/en/lang_strings.xml
core/include
asset_edit_interface.inc
asset_static_screens/metadata.inc
…so a fair few files have been changed. Not to say this probably can't be backported, but it is not for me to say whether
this should be done for 3.18.x - at the very least it is not currently officially supported in this branch.
[quote]The changes are in the 3.20.0 released versions of the following files:
core/assets/layout
asset.xml
edit_interface_screen_details.xml
layout.inc
layout_edit_fns.inc
layout_management.inc
locale/en/lang_strings.xml
core/include
asset_edit_interface.inc
asset_static_screens/metadata.inc
…so a fair few files have been changed. Not to say this probably can't be backported, but it is not for me to say whether
this should be done for 3.18.x - at the very least it is not currently officially supported in this branch.[/quote]
Thanks! I am just going to test this on my dev machine before I do anything…
How did it go Nic? I may use some support time to get Squiz to fix it for our 3.18 as well if it's doable.
I have not had a chance yet to try this. It should be pretty easy, as I will just use text wrangler to compare the files. I will let you know though.
If you do get support to do it, make sure they release it in the next 3.18 release!
Features don't make it into the oldest stable branch, and next month is the last planned 3.18 release anyway. It's time to jump on the 3.20 bandwagon or go for 3.22.
[quote]The changes are in the 3.20.0 released versions of the following files:
core/assets/layout
asset.xml
edit_interface_screen_details.xml
layout.inc
layout_edit_fns.inc
layout_management.inc
locale/en/lang_strings.xml
core/include
asset_edit_interface.inc
asset_static_screens/metadata.inc
…so a fair few files have been changed. Not to say this probably can't be backported, but it is not for me to say whether
this should be done for 3.18.x - at the very least it is not currently officially supported in this branch.[/quote]
I was working on this today and updated all the files, and every seemed to go ok. I see the new option on the details screen of layouts. Asset builders correctly have the cascade value removed, which is great! But, I run into a problem when trying to access simple edit. The following error is thrown, did I miss a file?
"file" => "[SYSTEM_ROOT]/core/assets/system/layout_manager/layout_manager.inc",<br />
"line" => 230,<br />
"function" => "sq_error_handler",<br />
"args" => array (<br />
0 => 2,<br />
1 => "Illegal offset type",<br />
2 => "[SYSTEM_ROOT]/core/assets/system/layout_manager/layout_manager.inc",<br />
3 => 230,<br />
4 => array (<br />
[Max Depth Reached]<br />
) <br />
) <br />
),
1 => array (
"file" => "[SYSTEM_ROOT]/core/include/asset_edit_interface.inc",
"line" => 1171,
"function" => "hasLayout",
"class" => "Layout_Manager",
"object" => new Layout_Manager Object (
"id" => "18",
"version" => "0.1.99",
"name" => "Layout Manager",
"short_name" => "Layout Manager",
"status" => "16",
"languages" => "",
"charset" => "",
"force_secure" => "0",
"created" => 1168561848,
"created_userid" => "0",
"updated" => 1236634816,
"updated_userid" => "48",
"published" => 1173912796,
"published_userid" => "48",
"status_changed" => 1173912796,
"status_changed_userid" => "48",
"_is_cacheable" => ,
"vars" => array (
[Max Depth Reached]
),
"_available_keywords" => array (
[Max Depth Reached]
),
"data_path_suffix" => "assets/layout_manager/0009/18",
"data_path" => "[SYSTEM_ROOT]/data/private/assets/layout_manager/0009/18",
"data_path_public" => "[SYSTEM_ROOT]/data/public/assets/layout_manager/0009/18",
"_ser_attrs" => 1,
"_tmp" => array (
[Max Depth Reached]
)
),
"type" => "->",
"args" => array (
0 => new Page_Standard Object (
[Max Depth Reached]
),
1 => "details"
)
),
2 => array (
"file" => "[SYSTEM_ROOT]/core/include/asset_edit_interface.inc",
"line" => 410,
"function" => "acquireLimboLocks",
"class" => "Asset_Edit_Interface",
"object" => new Asset_Edit_Interface Object (
"_type_code" => "page_standard",
"_edit_fns" => new Page_Standard_Edit_Fns Object (
[Max Depth Reached]
),
"_dirs" => array (
[Max Depth Reached]
),
"_screens" => array (
[Max Depth Reached]
),
"_default_screen" => "",
"_tmp" =>
),
"type" => "->",
"args" => array (
0 => new Page_Standard Object (
[Max Depth Reached]
),
1 => new Limbo_Outputter Object (
[Max Depth Reached]
),
2 => "details",
3 => "menu"
)
),
3 => array (
"file" => "[SYSTEM_ROOT]/core/include/asset.inc",
"line" => 4329,
"function" => "paint",
"class" => "Asset_Edit_Interface",
"object" => new Asset_Edit_Interface Object (
"_type_code" => "page_standard",
"_edit_fns" => new Page_Standard_Edit_Fns Object (
[Max Depth Reached]
),
"_dirs" => array (
[Max Depth Reached]
),
"_screens" => array (
[Max Depth Reached]
),
"_default_screen" => "",
"_tmp" =>
),
"type" => "->",
"args" => array (
0 => new Page_Standard Object (
[Max Depth Reached]
),
1 => new Limbo_Outputter Object (
[Max Depth Reached]
),
2 =>
)
),
4 => array (
"file" => "[SYSTEM_ROOT]/core/assets/page_templates/page_standard/page_standard.inc",
"line" => 182,
"function" => "paintBackend",
"class" => "Asset",
"object" => new Page_Standard Object (
"id" => "65",
"version" => "0.6.13",
"name" => "Home",
"short_name" => "Home",
"status" => "16",
"languages" => "",
"charset" => "",
"force_secure" => "0",
"created" => 1169223228,
"created_userid" => "48",
"updated" => 1205431376,
"updated_userid" => "48",
"published" => 1179432412,
"published_userid" => "48",
"status_changed" => 1179432412,
"status_changed_userid" => "48",
"_is_cacheable" => ,
"vars" => array (
[Max Depth Reached]
),
"_available_keywords" => array (
[Max Depth Reached]
),
"data_path_suffix" => "assets/page_standard/0011/65",
"data_path" => "[SYSTEM_ROOT]/data/private/assets/page_standard/0011/65",
"data_path_public" => "[SYSTEM_ROOT]/data/public/assets/page_standard/0011/65",
"_ser_attrs" => ,
"_tmp" => array (
[Max Depth Reached]
)
),
"type" => "->",
"args" => array (
0 => new Limbo_Outputter Object (
[Max Depth Reached]
)
)
),
5 => array (
"file" => "[SYSTEM_ROOT]/core/include/asset.inc",
"line" => 4282,
"function" => "paintBackend",
"class" => "Page_Standard",
"object" => new Page_Standard Object (
"id" => "65",
"version" => "0.6.13",
"name" => "Home",
"short_name" => "Home",
"status" => "16",
"languages" => "",
"charset" => "",
"force_secure" => "0",
"created" => 1169223228,
"created_userid" => "48",
"updated" => 1205431376,
"updated_userid" => "48",
"published" => 1179432412,
"published_userid" => "48",
"status_changed" => 1179432412,
"status_changed_userid" => "48",
"_is_cacheable" => ,
"vars" => array (
[Max Depth Reached]
),
"_available_keywords" => array (
[Max Depth Reached]
),
"data_path_suffix" => "assets/page_standard/0011/65",
"data_path" => "[SYSTEM_ROOT]/data/private/assets/page_standard/0011/65",
"data_path_public" => "[SYSTEM_ROOT]/data/public/assets/page_standard/0011/65",
"_ser_attrs" => ,
"_tmp" => array (
[Max Depth Reached]
)
),
"type" => "->",
"args" => array (
0 => new Limbo_Outputter Object (
[Max Depth Reached]
)
)
),
6 => array (
"file" => "[SYSTEM_ROOT]/core/assets/page_templates/page_standard/page_standard.inc",
"line" => 236,
"function" => "initLimbo",
"class" => "Asset",
"object" => new Page_Standard Object (
"id" => "65",
"version" => "0.6.13",
"name" => "Home",
"short_name" => "Home",
"status" => "16",
"languages" => "",
"charset" => "",
"force_secure" => "0",
"created" => 1169223228,
"created_userid" => "48",
"updated" => 1205431376,
"updated_userid" => "48",
"published" => 1179432412,
"published_userid" => "48",
"status_changed" => 1179432412,
"status_changed_userid" => "48",
"_is_cacheable" => ,
"vars" => array (
[Max Depth Reached]
),
"_available_keywords" => array (
[Max Depth Reached]
),
"data_path_suffix" => "assets/page_standard/0011/65",
"data_path" => "[SYSTEM_ROOT]/data/private/assets/page_standard/0011/65",
"data_path_public" => "[SYSTEM_ROOT]/data/public/assets/page_standard/0011/65",
"_ser_attrs" => ,
"_tmp" => array (
[Max Depth Reached]
)
),
"type" => "->",
"args" => array (
[Empty]
)
),
7 => array (
"file" => "[SYSTEM_ROOT]/core/assets/site/site.inc",
"line" => 838,
"function" => "initLimbo",
"class" => "Page_Standard",
"object" => new Page_Standard Object (
"id" => "65",
"version" => "0.6.13",
"name" => "Home",
"short_name" => "Home",
"status" => "16",
"languages" => "",
"charset" => "",
"force_secure" => "0",
"created" => 1169223228,
"created_userid" => "48",
"updated" => 1205431376,
"updated_userid" => "48",
"published" => 1179432412,
"published_userid" => "48",
"status_changed" => 1179432412,
"status_changed_userid" => "48",
"_is_cacheable" => ,
"vars" => array (
[Max Depth Reached]
),
"_available_keywords" => array (
[Max Depth Reached]
),
"data_path_suffix" => "assets/page_standard/0011/65",
"data_path" => "[SYSTEM_ROOT]/data/private/assets/page_standard/0011/65",
"data_path_public" => "[SYSTEM_ROOT]/data/public/assets/page_standard/0011/65",
"_ser_attrs" => ,
"_tmp" => array (
[Max Depth Reached]
)
),
"type" => "->",
"args" => array (
[Empty]
)
),
8 => array (
"file" => "[SYSTEM_ROOT]/core/include/asset_manager_edit_fns.inc",
"line" => 212,
"function" => "initLimbo",
"class" => "Site",
"object" => new Site Object (
"id" => "46",
"version" => "1.0.6",
"name" => "Pacific Union College",
"short_name" => "Pacific Union College",
"status" => "16",
"languages" => "",
"charset" => "",
"force_secure" => "0",
"created" => 1169138937,
"created_userid" => "12",
"updated" => 1205431250,
"updated_userid" => "48",
"published" => 1173893266,
"published_userid" => "48",
"status_changed" => 1173893266,
"status_changed_userid" => "48",
"_is_cacheable" => ,
"vars" => array (
[Max Depth Reached]
),
"_available_keywords" => array (
[Max Depth Reached]
),
"data_path_suffix" => "assets/site/0010/46",
"data_path" => "[SYSTEM_ROOT]/data/private/assets/site/0010/46",
"data_path_public" => "[SYSTEM_ROOT]/data/public/assets/site/0010/46",
"_ser_attrs" => ,
"_tmp" => array (
[Max Depth Reached]
)
),
"type" => "->",
"args" => array (
[Empty]
)
),
9 => array (
"file" => "[SYSTEM_ROOT]/core/include/asset_manager.inc",
"line" => 8027,
"function" => "paintBackend",
"class" => "Asset_Manager_Edit_Fns",
"object" => new Asset_Manager_Edit_Fns Object (
"am" => new Asset_Manager Object (
[Max Depth Reached]
),
"backend" => new Backend Object (
[Max Depth Reached]
),
"_tmp" => array (
[Max Depth Reached]
)
),
"type" => "->",
"args" => array (
[Empty]
)
),
10 => array (
"file" => "[SYSTEM_ROOT]/core/include/backend.inc",
"line" => 1378,
"function" => "paintBackend",
"class" => "Asset_Manager",
"object" => new Asset_Manager Object (
"_asset_types" => array (
[Max Depth Reached]
),
"_assets" => array (
[Max Depth Reached]
),
"_asset_cache" => new Asset_Cache Object (
[Max Depth Reached]
),
"_system_assetids" => array (
[Max Depth Reached]
),
"_attributes" => array (
[Max Depth Reached]
),
"_get_asset_history" => array (
[Max Depth Reached]
),
"_tmp" => array (
[Max Depth Reached]
)
),
"type" => "->",
"args" => array (
0 => new Backend Object (
[Max Depth Reached]
)
)
),
11 => array (
"file" => "[SYSTEM_ROOT]/core/include/backend.inc",
"line" => 189,
"function" => "_printMain",
"class" => "Backend",
"object" => new Backend Object (
"out" => new Limbo_Outputter Object (
[Max Depth Reached]
),
"_tmp" => array (
[Max Depth Reached]
)
),
"type" => "->",
"args" => array (
[Empty]
)
),
12 => array (
"file" => "[SYSTEM_ROOT]/core/include/mysource.inc",
"line" => 368,
"function" => "paint",
"class" => "Backend",
"object" => new Backend Object (
"out" => new Limbo_Outputter Object (
[Max Depth Reached]
),
"_tmp" => array (
[Max Depth Reached]
)
),
"type" => "->",
"args" => array (
[Empty]
)
),
13 => array (
"file" => "[SYSTEM_ROOT]/core/web/index.php",
"line" => 30,
"function" => "start",
"class" => "MySource",
"object" => new MySource Object (
"db" => ,
"\0\0_db_conns" => array (
[Max Depth Reached]
),
"\0\0_db_stack" => array (
[Max Depth Reached]
),
"\0\0_run_level_stack" => array (
[Max Depth Reached]
),
"backend" => new Backend Object (
[Max Depth Reached]
),
"am" => new Asset_Manager Object (
[Max Depth Reached]
),
"tm" => ,
"\0\0ms" => ,
"\0\0mm" => ,
"\0\0hh" => ,
"\0\0wm" => new Workflow_Manager Object (
[Max Depth Reached]
),
"\0\0fv" => ,
"\0\0em" => new Event_Manager Object (
[Max Depth Reached]
),
"\0\0tag_manager" => ,
"lm" => new Locale_Manager Object (
[Max Depth Reached]
),
"\0\0trigger_manager" => new Trigger_Manager Object (
[Max Depth Reached]
),
"log_manager" => ,
"user" => new System_User Object (
[Max Depth Reached]
),
"frontend_asset" => ,
"\0\0_user_is_root" => ,
"\0\0_user_is_sys_admin" => 1,
"\0\0_user_is_public" => ,
"\0\0_msgs" => ,
"\0\0_global_defines" =>
),
"type" => "->",
"args" => array (
[Empty]
)
) [/codebox]
PHP Error File: [SYSTEM_ROOT]/core/include/asset_manager.inc Line: 659 Message: Object of class Calendar_Event_Single could not be converted to string Backtrace: Show
If I can't figure out my error I guess I will just have to revert to my backups...which I don't want to have to do.
[b]UPDATE:[/b] Ok, figured it out, the layout_manager.inc file and page_standard.inc needed to be updated as well.
Rachel, it was actually pretty easy. I used a program called Text Wrangler to compare the old and new files.
But, it is not the most safe process, so I wouldn't really recommend you digging around and changing your code. :)
Yeah, it's pretty high on my list of things not to do. Wish analytics tracked javascript usage somehow so I could see how many users are seeing those boxes.
I think that you pretty much covered your bases with having that jQuery fix. It should do a fine job of hiding those fields. :)
Please note any implementation changes for reverting upon upgrading to 3.20.x so the expected Matrix functionality has effect. Otherwise upon upgrade it would look like the "show/hide checkboxes" is not working in accordance with the settings.
Edit: De-clunkify wording
[quote]Please note any implementation changes for reverting upon upgrading to 3.20.x so the expected Matrix functionality has effect. Otherwise upon upgrade it would look like the "show/hide checkboxes" is not working in accordance with the settings.
Edit: De-clunkify wording[/quote]
Sorry, I totally don't understand what you mean. Do you mean that my javascript targeting will stop working in 3.20 or that Nic's changes will be problematic?
Hi Rachel,
The changes will still be effective after upgrading. I just meant that if the implementation changes to work around the feature are not removed then the value set for the "Show Cascade Checkbox" after the upgrade will not reflect the interface shown, should these be required for display on any Simple Edit Layouts in the future.
It wouldn't need to be removed, which is what it probably sounded like from my post, however it will need to be noted that this is included should it be determined later that the "Show Cascade Checkbox" was not working as intended.