Hi,

LIKE AND UNLIKE BESIDE THE STATUS DISPLAY link takes me to a javascript page..

Comments

icecreamyou’s picture

Title: like nad unlike » like and unlike
Assigned: Unassigned » icecreamyou
Status: Active » Closed (duplicate)

OKAY

This isn't technically a duplicate of #437522 but the source of the problem is the same, and fixing that issue will fix this one as well.

icecreamyou’s picture

Title: like and unlike » Flags set destination to JS page after submit
Priority: Critical » Normal
Status: Closed (duplicate) » Postponed (maintainer needs more info)

It turns out that this is not a duplicate. What's actually happening is that parts of the form (including the flags) get regenerated by a function that's called on the JS page. The Flag module sets the flag's "destination" attribute to the URL of the current page--that is, the page on which the flag is generated--and this becomes the JS page after the form has been submitted once via JS.

However, this isn't actually a problem with the like/unlike flag, because the destination attribute never gets called. It is a problem with the Delete flag, because that flag sends you to a confirmation form which redirects to the destination parameter on submission.

Experimenting with this has revealed another problem, however: it seems that clicking the flags can make the JavaScript that handles toggling the form be added multiple times to the page. This causes the form to toggle several times when it is clicked, if form toggling is enabled. I'm not sure when or how this happens, but it needs to be addressed.

icecreamyou’s picture

Status: Postponed (maintainer needs more info) » Fixed

Fixed in dev. I removed the flags from the form because there isn't a clean way to avoid this behavior. The more typical use should be within Views anyway.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.