Coder Social home page Coder Social logo

Comments (9)

tommcfarlin avatar tommcfarlin commented on July 24, 2024

Hey @juando - Unfortunately, without knowing more context, there's little I can offer right now.

from wordpress-widget-boilerplate.

 avatar commented on July 24, 2024

Hi, i'm using it integrated in the theme not as a plugin so i deleted some parts that referred to plugin, sorry for not being clear.
what else you need as context? maybe i can put more info.

P.S.: i know undefined index is not a critical warning but just to get rid of it.

from wordpress-widget-boilerplate.

tommcfarlin avatar tommcfarlin commented on July 24, 2024

Undefined index means that you're trying to access a value in an array identified by a key, but that key doesn't exist in the array.

from wordpress-widget-boilerplate.

 avatar commented on July 24, 2024

Yes it says widget_id is the problem, i copied the entire code as it is just removed everything until line 31 in plugin.php, could that be it?

from wordpress-widget-boilerplate.

tommcfarlin avatar tommcfarlin commented on July 24, 2024

I'm really not sure without digging more into your theme. Issues are generally related to problems with the content of the repository rather than conflicts with integrating into themes.

Unfortunately, I can't offer more help than that.

from wordpress-widget-boilerplate.

 avatar commented on July 24, 2024

I understand, thanks anyway sorry about the problem.

from wordpress-widget-boilerplate.

sb-lc avatar sb-lc commented on July 24, 2024

i am also getting this message:

Notice: Undefined index: widget_id in /home/.../wp-content/plugins/medusa_widgets_menu/plugin.php on line 292

line 292 is this line of code -

    $cache[ $args['widget_id'] ] = $widget_string;

I have not done any real customisation the error appeared straight away

thanks

from wordpress-widget-boilerplate.

sb-lc avatar sb-lc commented on July 24, 2024

print_html_r ($args); looks like this -


Array
(
    [menu] => main-menu
    [menu_class] =>  menu navbar-nav  nav
    [theme_location] => main-menu-location
    [walker] => my_nav_walker Object
        (
            [tree_type] => Array
                (
                    [0] => post_type
                    [1] => taxonomy
                    [2] => custom
                )

            [db_fields] => Array
                (
                    [parent] => menu_item_parent
                    [id] => db_id
                )

            [max_pages] => 1
            [has_children] => 
        )

    [container_id] => navbar
    [container_class] =>  navbar-collapse collapse 
)

from wordpress-widget-boilerplate.

sb-lc avatar sb-lc commented on July 24, 2024

$cache[ $args['widget_id'] ] = $widget_string;

this line is problematic, not just because it causes an error but because if you have 2 of the same widgets on the same page this line forces the second instance to use the first instance and ignores the variables for the second instance

from wordpress-widget-boilerplate.

Related Issues (14)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.