Ad Sharing code not saving on user side

As I was discussing with Tom in live support, I'm setting up Ad Sharing on a single site. All is okay on the admin side. When I log in as my test user -- contributor status -- and go to the advertising page, I paste in the ad code, hit the Save Changes button, and the window erases. Naturally, no ad shows up.

I don't think it's the code. Code from the save provider -- Amazon -- from two different accounts does work on the admin side but not on the user side.

And I don't think it's a browser issue. I've logged out, done it in different browsers and even on different computers.

  • Elliott Bristow
    • The Bug Hunter

    Hey @rmcguire,

    Welcome to the forums!

    I've not been able to recreate this issue on my test server so it's difficult for me to offer a solution, however I have tagged the developer to take a look at this thread to see if he can suggest what might be causing it.

    I'm sure he'll be along shortly to take a look! :slight_smile:

  • rmcguire
    • WPMU DEV Initiate

    OK thanks. It's still not working today. FYI, I tried changing the user role for my test from contributor to author and that doesn't seem to be relevant. (In any case the ad share window appears to the user regardless of the role.)

    Basically, any text I put in that window should save, right? Good code or bad. It won't display, but when I hit save, I should still see anything I entered. But the window just empties. It doesn't happen in any other window the test contributor can access in other plug ins or settings. i.e. I can change their bio info and save that.

  • rmcguire
    • WPMU DEV Initiate

    Hmmm, some progress but not perfect and still mysterious.

    Restarting the computer helped some. Even though, as I say, I was earlier trying it on different computers and in different browsers with no luck, I don't think I was logged in to the site from two different points at the same time, which I know can screw up the editing and saving. In any case, if I was, it wasn't affecting other widgets and entry windows.

    Now that I've restarted the computer, I am able to save something in the ad code windows on the user side. Both gibberish and legit code from adsense and affiliates. (Unfortunately, because I can only create on one account with google, I can only use "my" code to test that and still haven't confirmed that another user can enter their own code.)

    The problem now seems be only with Amazon code. It's not that it won't display. It's still that the plug in won't save it to begin with, and that's only on the user side. As an admin I can save Amazon code, no problem, both my code and my test user code.

  • rmcguire
    • WPMU DEV Initiate

    That's it! (Someone should develop a huge sigh of relief from site administrator emoticon to use on these forums.)

    It was checked. Now that I've unchecked I don't see any problems. Thank you very much.

    Can you clarify for me what that feature is for? By having it unchecked is there a safety issue? (Do I need to tell me contributors that I'm going to have to limit ad sharing to adsense?)

  • Vladislav
    • Dead Eye Dev

    Hi,

    If enabled, this feature will strip out all the script tags and potentially harmful attributes from the ad code before saving it, except for Google ads. This is so you don't end up with some sort of malicious javascript code from your users - there is a potential for this to happen with this field unchecked. However, if you need to use javascript code from other ad providing services, this is currently your best option.

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.