salesagility / SuiteCRM

SuiteCRM - Open source CRM for the world
https://www.suitecrm.com
GNU Affero General Public License v3.0
4.53k stars 2.1k forks source link

customCode on detailviewsdefs not working anymore? #4118

Closed halest closed 5 years ago

halest commented 7 years ago

Issue

Before updating to 7.9.x, I had the following code in custom/modules/accounts/metadata/detailviewdefs.php: array ( 0 => 'EDIT', 1 => 'DUPLICATE', 2 => 'DELETE', 3 => 'FIND_DUPLICATES', 'AOS_GENLET' => array ( 'customCode' => '<input type="button" class="button" onClick="showPopup();" value="{$APP.LBL_GENERATE_LETTER}">', ), 4 => array ( 'customCode' => '<input type="button" name="customButton" onClick="window.open(\'https:xxxxx;" value="Kundenübersicht">', ), 5 => array ( 'customCode' => '<input type="button" name="customButton" onClick="closeAllMenus();searchOnXYZ();" value="Auf XYZ öffnen">', ),..... which was working great. After the update, none of my custom buttons is shown any more. Did something break?

Expected Behavior

Custom code is shown.

Actual Behavior

Custom Code is not shown.

Your Environment

halest commented 7 years ago

@Dillon-Brown Sorry to ping you again directly but my users keep asking me about the missing buttons. Have you possibly got an idea?

Dillon-Brown commented 7 years ago

@halest This looks like a bug. Might be fixed by this PR #4097 but will need to investigate further.

gunnicom commented 7 years ago

@Dillon-Brown Why should it be fixed by a PR that states "This change adds additional tests to module builder. Which adds fields in module builder." I dont read anything about fixing a bug in there. If it fixes a bug, as @judgej states in #4097 they should be completely seperate PRs.

Dillon-Brown commented 7 years ago

@gunnicom #4097 contains several other PRs some of which contain bug-fixes. The specific PR that may be related here is #3918.

halest commented 7 years ago

@Dillon-Brown Just updated to release 7.9.5 and the problem is not fixed

drosenfeldpositive commented 7 years ago

I'm working at a Clean installation of 7.9.5 and have the same problem.

At 7.9.6 release notes I don't see it's fixed: https://suitecrm.com/wiki/index.php/Release_notes_7.9.6

halest commented 7 years ago

This is a real bummer, as many of our workflows are based on this and my users are knocking on my door daily. Does anyone know if there is an official downgrade-path back to the LTS?

halest commented 6 years ago

Hey everyone, I've got a bit of breathing room here and there the next couple of days. Can someone who knows the codebase better than I do point me to where these arrays should be rendered into the layout? Maybe I can help out here.

daniel-samson commented 6 years ago

include/DetailView/DetailView2.php is a good place to start.

zoltankocsardi commented 6 years ago

It works for me in 7.9.8.

selection_004

@halest: if you have still this problem, can you paste your code here, please?

halest commented 6 years ago

@zoltankocsardi Thanks for answering. The relevant part of is in the issue descirption, no? I have looked into it further on my deployed version late last year and it seemed very interesting: At the end of DetailView2.php, my code was successfully written into the array when I dumped it out. But whoever is the controller for DetailView2.php then drops itor something. At least in the last stage of displaying it the array is just the default again. I am still on holiday so I can't look up the line numbers but I can provide them next week.

For now, since I could not wait for this, I have just stopped any further updates and have hacked the same code into the main file because at least it worked there.

PedroErnst commented 6 years ago

@halest Does this still happen on 7.9.9?

PedroErnst commented 6 years ago

Seems to work fine on my end on 7.9.11

screenshot from 2018-02-05 13-45-43

PedroErnst commented 6 years ago

@Dillon-Brown is this a High Priority still? OP hasn't posted again, and 7.9 is no longer supported anyway. Neither Zoltan nor myself have been able to reproduce the bug.

halest commented 6 years ago

Hey @PedroErnst , it still didn't work for me but I've hacked it into the base instead of custom at the last point of rendering and stopped updating. Will leave it like that for the moment until I feel brave enough to update again. So do with it what you will^^