Forum Replies Created

Viewing 15 replies - 16 through 30 (of 564 total)
  • Thread Starter John Huebner

    (@hube2)

    The = here should be a -, that’s what I get for typing it out because I couldn’t figure out how to copy from the browser debugger

    wp-admin-bar=wpcode-loaded-on-this-page
    Thread Starter John Huebner

    (@hube2)

    I recently had a similar problem with my own script that required checking that the element actually existed before trying to set a value when using document.querySelector. The problem is that at that location in your code the element does not exist.

    Not sure what you want need. This is for a client. The site is running on wordpress.com. I can’t set script debugging on there or I would give you more detail on the line in the code causing the issue.

    Theme: Alves

    Plugins:
    Akismet
    Elementor
    Elementor Pro
    Elementor Header & Footer Builder
    Form Vibes
    Jetpack
    Safe Redirect Manager
    Smush
    Ultimate Addons for Elementor
    WP Rocket
    WPCode Light (this plugin I have checked code added using this plugin but none of it affects the admin menu)
    Yoast SEO

    This error happens both on the front end of the site when logged in and in the admin. The error causes the admin menu at the top of the page to be broken and not work. It also blocks some other scripts from running do to this error.

    This error does not happen when not logged into the site

    Error from the admin

    Uncaught TypeError: document.querySelector(...) is null
    
    /wp-content/plugins/insert-headers-and-footers/build/admin-bar.js?ver=5d377aa89c93914bb91207685348f326
    
    Line/Char: 1:1050
    
    0===wpcode_admin_bar_info_count&&(document.querySelector('#wp-admin-bar=wpcode-loaded-on-this-page .wp-admin-bar-arrow).style.display="none");
    Thread Starter John Huebner

    (@hube2)

    I have also tried
    from: /some-page?X=5
    to: /some-other-page/
    the old system was no WP, all pages had query strings for finding the page, this needs to be removed on the new site.

    Plugin Author John Huebner

    (@hube2)

    As long as the menu slug and the post ID are the same yes.

    However, there is on feature in this plugin that was not duplicated in the ACF version, and that is “Save to: This Post”. Each options page in this plugin was a post in a custom post type and the values would be saved in _postmeta for the of the CPT. If you used this feature then there is no replacement. You will need to create a custom post type “acf-options-page” and you will need to ensure that the post_id setting for the options page is set to the correct post ID. If you want to retain the values.

    As of now, while I am no longer supporting this plugin for the future, it still works with the current version of ACF and WP. This plugin simply creates a CPT and then uses the values entered to call the acf_add_options_page() and acf_add_options_sub_page() functions. The feature in ACF does approximately the same thing except that it also creates local JSON files if the acf-json folder exists in the theme.

    Thread Starter John Huebner

    (@hube2)

    This is not really what I was looking for as it means that the overlay color will need to be applied to the background image before uploading, this is not something that my clients will be able to do easily. It also means that the overlay settings in this plugin are a completely useless feature.

    Even an addition of some type of filter hook in an update that would let me correct the inherent problem would be a step in the right direction.

    Thread Starter John Huebner

    (@hube2)

    Page on site with issue https://www.rudyschmid.com/vehicle-maintenance/rust-proofing/

    Here is the HTML generated by this plugin:

    <div class="hbupro-hero-banner-wrp-1 hbupro-clearfix hbupro-layout-2">
      <div class="hbupro-hero-banner hbupro-clearfix">
        <div class="hbupro-hero-banner-inner hbupro-clearfix">
          <div class="hbupro-hero-banner-inner-wrap">
            <div class=" hbupro-medium-12 hbupro-columns hbupro-hero-content-position hbupro-text-center">
              <h2 class="hbupro-hero-banner-title">Rust Proofing for Your Vehicle</h2>
              <div class="hbupro-hero-banner-sub-title">
                <p>Keep Rust at Bay on Your Car in CNY's Unpredictable Weather</p>
              </div>
              <div class="hbupro-hero-banner-links">
                <a class="hbupro-button hbupro-rudy-dark-red" href="https://www.rudyschmid.com/vehicle-maintenance/rust-proofing-faqs/">FAQs</a>
                <a class="hbupro-button hbupro-rudy-dark-red" href="https://www.rudyschmid.com/contact-us/">Contact Us</a>
              </div>
            </div>
          </div>
        </div>
      </div>
    </div>

    And here is the CSS

    <style type="text/css">
      .hbupro-hero-banner-wrp-1 .hbupro-hero-banner {
        background-image: url(https://www.rudyschmid.com/wp-content/uploads/2020/06/DSC04593-2-scaled.jpg); 
        background-size:cover;
        background-position: 50% center;
        background-attachment: fixed
      }
      .hbupro-hero-banner-wrp-1 .hbupro-hero-banner .hbupro-hero-banner-inner {
        background-color:#b72a2a;
        opacity:0.4;
      } 
      .hbupro-hero-banner-wrp-1 .hbupro-hero-banner-inner-wrap{
        max-width: px;
      }
      .hbupro-hero-banner-wrp-1 .hbupro-hero-banner h2.hbupro-hero-banner-title {
        font-size: 30px !important;
        line-height: 30px !important;
        color:#fff
      }
      .hbupro-hero-banner-wrp-1 .hbupro-hero-banner .hbupro-hero-banner-sub-title p,
      .hbupro-hero-banner-wrp-1 .hbupro-hero-banner .hbupro-hero-banner-sub-title {
        font-size: 20px !important;
        color:#fff
      }
      .hbupro-hero-banner-wrp-1 .hbupro-hero-banner-inner {
        padding:150px 0px 150px 0px
      }
    </style>

    As you can see the the content (title, subtitle, ect) is contained by the element with the selector:

    .hbupro-hero-banner-wrp-1 .hbupro-hero-banner .hbupro-hero-banner-inner

    This element is set to an opacity of 0.4 as defined in the overlay opacity when creating this banner. Because the entire element is set to this opacity all of the elements that it contains are also set to this opacity, making the text semi-transparent. It is not possible to set the inner elements of a container to higher opacity than the container.

    To correct this either 1) the text cannot be contained in the overlay element or 2) an RBGA color value must be used for the background color of the overaly instead of setting the opacity of the entire overlay container.

    Transparent text is not the desired result, only a semi-transparent overlay of the image is the desired result.

    • This reply was modified 2 years, 10 months ago by John Huebner.
    Plugin Author John Huebner

    (@hube2)

    This is mostly useful in 1 to many relationships, but has other uses.

    Let’s say for example that you have a relationship field between a manufacturers and products. A manufacturer can have many products but a product can have only one manufacturer.

    Now let’s supposes that you have a product “A” related to manufacturer “X” and you need to change this to Manufacturer “Y”.

    You have also added a filter that allows the 1 side of the relationship to be overwritten.

    If you edit the product and change the field for manufacturer from “X” to “Y” (that only allows 1 selection), when you save this post then the product will be added to manufacturer “Y” and deleted from manufacturer “X”

    If you edit this by editing the manufacturer (Y) to add the product. The relationship on the product “A” will be changed to manufacturer “Y” and “X” will be deleted from that product. The post for manufacturer “X” will also be updated to remove the product from the list of products for that manufacturer.

    Plugin Author John Huebner

    (@hube2)

    I will still be supporting this plugin, not that it takes a lot of support.

    Here are the differences for using this plugin and why I will not be deleting it just yet.

    1. Relationship maximum selections on the relationships on the other end are respected. A filter is available to allow overtiring and the behavior of overwriting relationships on the other side. The ACF feature does not respect these max allowed selections of the other end of the relationship.
    2. This plugin cascades changes to the relationships. What I mean by this is, if you add a relationship on a post AND that post requires overwriting to add the post on the other end of the relationship because of the max value AND you have added a filter to allow overwriting of the field THEN when a selection on the other end of that relationship is deleted then this plugin will remove the relationship from that 3rd level related post as well.

    If you do not need to respect, or worry about the max values on related posts then the ACF feature will do what you need.

    I’m not 100% sure, but from the language of the documentation I’m not even sure that ACF will delete the relationship from the other end if it is removed, but I have not tested the feature in ACF.

    • This reply was modified 2 years, 11 months ago by John Huebner.
    Thread Starter John Huebner

    (@hube2)

    I don’t know if it’s this plugin or the theme. But to make the company name required I had to: Cotomizer => WooCommerce => Checkout

    Thread Starter John Huebner

    (@hube2)

    I am also getting the error “Your changes were not saved due to an error (or you made none!).” I have max_input vars set at 10000

    Plugin Author John Huebner

    (@hube2)

    This is not an issue I know about, but I also don’t know anything about polylang. My limited understanding is that you create multiple posts and different posts are show dependent on a language and therefore you don’t have different field groups.

    How this plugin works is that it looks at the submitted values for a post, then it looks at the related posts and finds the field on that post that matches the field name and updates that post.

    Things that could interfere:

    • another field with the same name
    • editing posts on both side of the relationship at the same time

    Also having this issue. The solution above will not fix the problem.

    wp_localize_script( 'build/index.js', 'ajaxurl', admin_url( 'includes/admin-ajax.php' ));

    Changing the third parameter to an array will create a javascript variable of

    var ajaxurl{'0', 'URL VALUE')

    Meaning that the JS here

    xhr.open('POST', ajaxurl)

    Will not have the correct url unless it is also changed to something like
    xhr.open('POST', ajaxurl[0])

    Best choice is to not update until this is corrected.

    Plugin Author John Huebner

    (@hube2)

    This plugin was removed more than 2 years ago, it has not been supported for 5 years. You should not really be using it.

    Plugin Author John Huebner

    (@hube2)

    yes

    Plugin Author John Huebner

    (@hube2)

    Several reasons.

    1. I have never been able to work out how to make it work in 100% of use cases.
    2. Compatibility issues with newest version of ACF
    3. This is really a very simple filter that can be easily coded by anyone using the acf/prepare_field filter. It is really better to build filters like this for specific needs.
    4. And the biggest, I no longer have time to maintain and fix plugins in general.

    There is still a version of this plugin on gitub.

Viewing 15 replies - 16 through 30 (of 564 total)