Forum Replies Created

Viewing 4 replies - 1 through 4 (of 4 total)
  • Hi! I finally got fixed the error ‘Undefined variable: network_options’ it was causing Media tab to not load either.

    Inside the file <wpFolder>/wp-content/plugins/tcs3/inc/base.class.php . In my case it said the error was in line 51.

    That line looks like this:

          
            if (is_array($network_options)) {
                $options = array_merge($options, $network_options);
            }
    

    If you add an isset test before checking if network_options variable is an array, it works fine for us.

    Like this:

            if (isset($network_options) && is_array($network_options)) {
                $options = array_merge($options, $network_options);
            }
    

    Not sure what this $network_options is actually for, but apparently in some cases it doesn’t get created.

    Hope this helps other people facing same issue

    • This reply was modified 6 years, 11 months ago by cbonastre.
    • This reply was modified 6 years, 11 months ago by cbonastre.
    Thread Starter cbonastre

    (@cbonastre)

    @tcmccarthy1 Great! Updated the code with your push and it looks fine now. Thanks for the quick fix ??

    Thread Starter cbonastre

    (@cbonastre)

    Hi @jdembowski

    for us, it shows when you try to add an Object from the Post Edition menu. I’d show a screenshot, but can’t find out how to add images here.
    Here GoogleAdsShowing

    Steps to reproduce would be:
    Access the Admin -> Posts -> Add New / Edit an existing post (works in both cases) -> Click in ‘Add Media’ from inside the edition mode.

    In the ‘Media Library’ tab, you’ll see there are 2 ads, one on top of the image list and one at the bottom

    • This reply was modified 8 years ago by cbonastre.
    • This reply was modified 8 years ago by cbonastre.
    • This reply was modified 8 years ago by cbonastre.

    Just fixed it manually. In line 130:
    changed

    $image["src"] = $this->build_attachment_url($image["src"]);

    to

    $image["src"] = $this->build_attachment_url($image["0"]);

    (the array received in the function doesn’t contain keys)

    for line 134:
    function calculate_image_srcset had too many parameters (5 in total).

    public function calculate_image_srcset($sources, $size_array, $image_src, $image_meta, $attachment_id){

    I left the one that is actually in use, like this:

    public function calculate_image_srcset($sources){

    hope this helps!

Viewing 4 replies - 1 through 4 (of 4 total)