BBPress Steven Zahm : Replies Created

Forum Replies Created

Viewing 10 posts - 3,051 through 3,060 (of 15,332 total)
  • Author
    Posts
  • in reply to: conflict with Advanced Ads #430529
    Steven Zahm
    Keymaster

    @ shanna

    If you drop the code I gave in the theme’s functions file instead of using a Code Snippets as suggested, you need to after_setup_theme action instead of the plugins_loaded action to run the code. Like so:

    add_action( 'after_setup_theme', 'cn_remove_code_pre_filters', 11 );
    
    function cn_remove_code_pre_filters() {
        remove_filter( 'content_save_pre', array( 'cnShortcode', 'clean' ) );
        remove_filter( 'content_save_pre', array( 'cnShortcode', 'removeCodePreTags' ) );
    }
    

    The reason is that the plugins_loaded action has long since been fired and run by WP by the time the theme’s functions file is loaded so the code to remove the filters was never actually being run.

    I edited the test site’s theme functions file to use the correct action. Removing those filters do remove the conflict as I suspected.

    in reply to: conflict with Advanced Ads #430524
    Steven Zahm
    Keymaster

    @ shanna

    Another thought…

    Having slashed quotes on save could indicate that something else is also hooking into the content_save_pre filter but not properly dealing with slashes.

    Connections does have two filters which run when a post is saved in WordPress using the content_save_pre filter and only one these two manipulates quotes. The clean function converts smart or fancy quotes to straight quotes but only within the Connections shortcode. That is done because users copy/paste from the website and end up with fancy quotes in the shortcode which WP does not support and can break its shortcode parser. This has saved me a lot of support requests saying shortcode do not work.

    When you hook into the content_save_pre filter you must expect slashed data and then return slashed data.

    I decided to checkout the code for Advanced Ads. They do not hook into the content_save_pre but they do apply that filter to sanitize their ad content before their ad content is saved. This has the effect of causing my clean function to run on their ad content (not desirable) which does expect slashed data but does not return the data slashed.

    I suspect that I am not able to duplicate the issue on my site because their code runs last on my site but on your site Connections code runs last. The run order can be influenced by the order WP loads a plugin when filters have the same priority.

    All that said, there is indeed a conflict, but since they are using a core WP filter name in their plugin (and after reviewing their code) I am unable able to see a way for me to remedy the conflict. Ideally they should update their code and its usage of the content_save_pre filter to expect slashed data and return slashed data to match the WP core usage of the filter.

    I do have a work around solution which you can implement.

    Install the Code Snippets plugin and add the following code as a new snippet:

    add_action( 'plugins_loaded', 'cn_remove_code_pre_filters', 11 );
    
    function cn_remove_code_pre_filters() {
        remove_filter( 'content_save_pre', array( 'cnShortcode', 'clean' ) );
        remove_filter( 'content_save_pre', array( 'cnShortcode', 'removeCodePreTags' ) );
    }
    

    This basically removes the Connections code which is run when a post is saved. They are not critical for function so are safe to remove.

    Hope this helps, let me know.

    in reply to: Running Multiple Installs of Connections Pro #430515
    Steven Zahm
    Keymaster

    @ David

    RE: if I use the Form extension and I want different emails to go out depending on the category is that possible?

    Sorry, no it is not… something like that would have to be custom coded.

    RE: is there a way to force a category when a person signs up?

    Well, you could set the default category to the category of you choice and then remove the option to permit the user to select their own categories. Would that work?

    in reply to: Integrating with CRM #430513
    Steven Zahm
    Keymaster

    @ Barbara

    I would guess that it is possible based on the fact CiviCRM has a WP plugin to sync contact/users. That said… I have nothing available ready to go out of the box. Something like this would have to be custom developed. Depending on the requirements to be able to sync a Connections entry with a CiviCRM contact it could take a lot of time to develop.

    NOt sure if my answer is actually helpful, but I do hope it is.

    in reply to: associating form entry with user-id #430512
    Steven Zahm
    Keymaster

    @ Paul

    Unless I misunderstand… wouldn’t it be better to ask the Ninja Forms support on how to add the User ID to a submitted form? I suspect you might need their User Management add-on, but honestly, I do not know.

    I hope this helps, let me know.

    in reply to: conflict with Advanced Ads #430468
    Steven Zahm
    Keymaster

    @ shanna

    re: This is a real server

    Oh, my apologies, when you stating “on Windows 10” I thought you meant on a desktop running “regular” Windows 10 on a desktop. So this is issue is presenting itself on Windows 10 Server? What IIS version? Admittedly I do not test against Windows/IIS so perhaps there is a bug revealed when running Connections on this combination of OS/web server. If you can give me a temp admin login I can take a close look to see how this bug is being introduced and correct it. The login details can be posted here as a private reply.

    in reply to: conflict with Advanced Ads #430464
    Steven Zahm
    Keymaster

    @ shanna

    I checked again, I am still unable to replicate. Can you please try on a real server and with the latest version of Connections?

    in reply to: conflict with Advanced Ads #430432
    Steven Zahm
    Keymaster

    @ shanna

    RE: would mind telling me what version of PHP and WP you tested with

    Sure…

    WP 4.8, Theme: Twenty Seventeen
    PHP 5.3.29 – 7.1.2

    RE: this problem is occuring only for the second and subsequent save of rich text

    Ok, no matter how many times I click the “Update” button to save the ad, the double quotes are never escaped.

    RE: i will try again, and this time remove all other plugins except the two that seem to be conflicting

    Let me know what you learn.

    in reply to: conflict with Advanced Ads #430252
    Steven Zahm
    Keymaster

    @ shanna

    I installed Advanced Ads and added a new Rich Content ad and saved it multiple time with and without making edits with both style of quotes and they were never escaped.

    I see that Advanced Ads is basically just a custom post type (CPT). Connections does not really interact with post content at any level. There is of course the shortcode interaction where the directory is embedded. There is also a bit of code that runs on the [connections] shortcode only which works to correct common errors … but does not do any escaping. So I am not sure how Connections could be the cause of the conflict? HOw did you identify Connections? Your testing procedure. Did you deactivate all plugins except Connections and Advanced Ads to to if the issue persisted? If it did, did you also test using one of WP core 201x themes (to eliminate the theme as the source)?

    It possible I’m am not replicating the issue correct or looking at the correct place to even see it if it is a conflict with Connections. Could you give me the exact steps to reproduce and where the escaped quotes present themselves?

    in reply to: Block access to non-directory page #430251
    Steven Zahm
    Keymaster

    @ Peter

    Hmmm… The login widget doesn’t black access to anything. It only permits a user to log into their WP user account on you website. Much the same as the core WP Meta widget. Its their user account privileges that can be leveraged to block and show content. TML is the same, just another way to allow a user to log into your site. Perhaps you are looking or in need of a a membership plugin like Restrict Content Pro??? Or, or, maybe nothing that complex… Edit your page with the PDF links and change the “Publish” status to “Private”, now only logged in users will be able view that page.

    Hope that helps, let me know.

Viewing 10 posts - 3,051 through 3,060 (of 15,332 total)