-
-
Notifications
You must be signed in to change notification settings - Fork 825
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Afform - Fix saving and editing entity blocks #22963
Conversation
Fixes dev/core#3120 Regression caused by civicrm#21218 Also fixes undefined variable errors when editing a block.
(Standard links)
|
@andyburnsco since this is a regression PR for the RC branch it needs to be tested and and merged asap. Can you try it out today? |
I tried testing but with the patch applied I get error 500 when visiting the form builder admin page.
|
@demeritcowboy since this patch only touches the JS side it wouldn't be able to cause that server-side error. But I remember seeing something similar recently and it was a caching issue. |
I had cleared caches and tried another install too. There error is happening during js loadAdminData, I assume here:
|
Not this patch, no. I assume you are getting that error with and without this patch. |
No it's fine without the patch. I'll try to get more details. |
I had a go at this with & without the patch - without the patch it seemed to save (unlike the issue report) but my console was full of red. With the patch the red went away & it still seemed to work |
It's not the saving, it's clicking the edit button on the form builder admin listing page, on the blocks tab. |
@demeritcowboy yeah that worked for me with & without - but console errors without the patch - this is my block |
Ok weird because I was able to reproduce the initial report. |
@demeritcowboy the edit button worked - I just saw console errors when I had the console tab open |
I had console errors AND it didn't work. Nothing happens when you click it. It's also on dmaster.demo now if you want to see it: https://dmaster.demo.civicrm.org/civicrm/admin/afform#/?tab=block |
Right. And @eileenmcnaughton your block doesn't have a container. |
I think my confusion is that you have to delete your existing broken blocks, otherwise you still get errors after upgrading. Then additionally there's a quirk or something where if you delete the block, then go edit the form, the block is gone, so you add it again, but then magically the original block comes back as a duplicate block on the form. But yes starting from scratch, this fixes the edit problem. As a minor note even after starting from scratch/clearing cache, I have a couple repeated warnings in drupal watchdog: |
Yes, this PR prevents broken blocks from being created, but it doesn't fix existing broken blocks. I can try to do a followup for that once this is merged @demeritcowboy |
I forgot to put merge-ready but yes I think can merge. |
Overview
Fixes dev/core#3120
Regression caused by #21218
Also fixes undefined variable errors when editing a block.
Before
Unable to save a block for an entity. Editor has console errors when editing blocks.
After
Fixed.
Technical Details
This was caused by #21218 renaming a block property, but the "Save block" popup did not get updated.