Hi there,

I noticed that you fixed the problem with the contact form that I raised at some point (i.e. the fact that the /admin/settings/contact would get /lightbox2 appended!)

The fix consists of testing whether an href ends with /contact. It seems to be that it should actually start with /contact.

  // Now
  $("a[href$='/contact'], a[href$='?q=contact']").each(function() { ... }

  // Proposed fix
  $("a[href^='/contact'], a[href$='?q=contact']").each(function() { ... }

That works for me! 8-)

I have a website with several links to the contact form each of which will select a different category with the use of prepopulate and ?edit[cid]=number

For instance, my Feedback button has:

  /contact?edit[cid]=4

Which was working before but because of the $ it stopped working. Any reason why you used $ instead of ^?

To avoid having a longer path (i.e. to avoid matching /contact/something-else, we can add a not:a href*=/contact/

What do you think?

Thank you.
Alexis Wilke

Comments

AlexisWilke’s picture

By the way, as an example, look at this page:

http://snapwebsites.info/

There is the Contact at the top, the Feedback on the left and the Support in the bottom menu.

Thank you.
Alexis

stella’s picture

Status: Active » Postponed (maintainer needs more info)

I'd have to test, but wouldn't your suggested change not allow per-user or per-og contact forms from working?

AlexisWilke’s picture

Somehow it looks like it's working on my website... My users are hidden, but you can test on your website too and see that it works. Now why that would work is a good question! I don't have an answer for it... a bug in jQuery?

AlexisWilke’s picture

Thinking about it we should be able to have something like this instead:

a[href$='/contact']
a[href*='/contact?']
a[href$='/?q=contact']
a[href*='/?q=contact\\&']

AlexisWilke’s picture

Status: Postponed (maintainer needs more info) » Active

Note that I'm not using Organic Groups so I have no clue on that one...

Thank you.
Alexis