You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
as implemented in async loadChallenge(challengeId), core-beta invokes displayChallenge in CTFd.js which downloads view.js for a challenge and does this:
before core-beta, postRender is invoked after the html is actually rendered, yet core-beta uses alpinejs, so show() the modal takes effect after the entire displayChallenge, which breaks the logic of a plugin which relied on postRender to get the challenge id with jquery($('#challenge-id')) and load the challenge info.
I think what I really need is CTFd._internal.challenge.data.id, yet I still wonder should postRender keep the previous behavior when virtual dom is actually rendered? otherwise what's the point of the postRender hook?
The text was updated successfully, but these errors were encountered:
frankli0324
added a commit
to frankli0324/ctfd-whale
that referenced
this issue
Jan 3, 2024
* adjust model and assets to fit CTFd 3.6
* router config should be checked before resetting
* view.js fix and 404 message fix
reference: CTFd/core-beta#58
as implemented in
async loadChallenge(challengeId)
, core-beta invokesdisplayChallenge
inCTFd.js
which downloadsview.js
for a challenge and does this:https://github.com/CTFd/CTFd.js/blob/65df4e05fa039b6e464d50e62423e4536580f318/pages/challenge.js#L18-L33
before
core-beta
,postRender
is invoked after the html is actually rendered, yetcore-beta
uses alpinejs, soshow()
themodal
takes effect after the entiredisplayChallenge
, which breaks the logic of a plugin which relied onpostRender
to get the challenge id with jquery($('#challenge-id')
) and load the challenge info.I think what I really need is
CTFd._internal.challenge.data.id
, yet I still wonder shouldpostRender
keep the previous behavior when virtual dom is actually rendered? otherwise what's the point of thepostRender
hook?The text was updated successfully, but these errors were encountered: