-
Notifications
You must be signed in to change notification settings - Fork 5
Updated Layout #15
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
Updated Layout #15
Conversation
|
Works great under Symphony 2.5.1 but not sure what @michael-e ment with https://github.com/hananils/default_event_values/commit/a6da18d3e7144acf7e21aa04eb22f6e0124dd2a7 |
|
Ah, I see, thanks. Hmm, but I got it right, bellow the |
|
What's your version of Default Events? |
|
|
|
Aha, so maybe that fixes it? I will wait for @brendo to pull this PR. |
|
Now that is strange. I checked it, and I already use the code in this PR. Nevertheless, I have this issue with new events. |
|
Hm, it is. Well, to confirm, I really took only the files from the |
|
Unless @nilshoerrmann has an idea, I should open a separate issue if the problem persists with the next release . The pull request here will be necessary/useful anyway, I think. |
|
Sounds good. |
My only idea is that another extension is manipulating the markup which results in a different element count (either on your install or on ours). My other idea is that this |
|
You might take a look if you see a suspicious extension, it's the project we are working on together. :-) |
|
Yeah, I noticed the screenshot ;) |
|
Uhm, I've taken a look the related install:
That doesn't make much sense … |
|
I should have removed the Domain from the URL… Done! You are right, it doesn't make much sense. :-( |
|
Things that come into my mind:
But I have to admit that this |
|
I found the reason: The markup of the remote install contains a XSRF token in a hidden input field which is not present on my local install: <input name="xsrf" value="ZZrICBLq8+sdfs/E0YwEa+M" type="hidden"> |
|
This is injected by Symphony if you switch on XSRF protection. But why does it work then if you edit an existing event? Is the position of the hidden field different then? |
|
I don't know. The extension structure is a bit strange. |
|
@brendo, can you please pull this? Although there is still a small glitch (see discussion above), it should make the extension work with Sym 2.6. |
|
@brendo, I'm also hoping to use Default Event Values with Sym 2.6, so if you could pull it (and release?) that would be great. Thanks! (And apologies if I should be speaking to others instead of you about updating this.) |
Update layout for Symphony 2.4+ compatibility
|
Done @DavidOliver & @michael-e. Let me know how it goes and we'll see if anything new pops up. I haven't the time just yet to test myself, or peek into the changing order depending on if XSRF is enabled or not, so hopefully someone can help :) |
|
I have been working with the code of this PR for a long time now, and it basically works. Regarding the small glitch mentioned above (the position on the event page being different in new/edit context), I can not replicate this with Symphony 2.6.7. Now, the position is always above the "essentials" section of the page, no matter if the event is new or edited. So the default values section should be moved down a bit on the page. Should I send a PR for this? |
|
Thanks, chaps. Using @michael-e's new version, the location of the Default Values section:
This is the case both when creating a new event and editing an existing one. Edit: I haven't looked at the code yet, but would inserting the XSRF input at the end of the form instead of the beginning be an option? |
|
Yeah, OK, hmmm. That's still not perfect. It would be cool to skip the XSRF node… I will take a look. |
|
Unfortunately I can't seem to find a suitable method in the XMLElement class to do what we are after. One might think about moving the XSRF element further down in the Symphony core… but I don't see any solution in the extension. @brendo? |
|
Sorry, long lag on my behalf. There's no method that will do it magically, but you could inspect the element via |
|
Isn't that too much "hardcoded magic"? That would create a rather strong dependancy on the backend code. Shouldn't we rather live with the result of #16, as desrcibed by @DavidOliver? |

Symphony 2.4 compatibility.