Git Product home page Git Product logo

Comments (7)

tw2113 avatar tw2113 commented on May 27, 2024

Any sort of javascript errors or similar showing up in your browser's developer tools console?

from cmb2-snippet-library.

paolosax avatar paolosax commented on May 27, 2024

Hello Michael, thanks for your quick reply...

...nope, but I've just noticed one thing (weird):

  • the upload button works in Chrome
  • it doesn't in Firefox (dev edition - the one I was working when I wrote this thread)
  • No js console errors in both

Now, after uploading an image with Chrome, it started to work Firefox too (???).

But, in both cases, the uploaded image do not appear in the theme template where I've included the dynamic_sidebar...

The same behaviour was for the Color Picker...

mmmh...

from cmb2-snippet-library.

tw2113 avatar tw2113 commented on May 27, 2024

It's this one that you're working with, right? https://github.com/CMB2/CMB2-Snippet-Library/blob/master/widgets/widget-example.php If not, please point to the one you are using.

It may be an example that needs refreshed/touched up, as I'm seeing it's 2 years old at this point, and if you've customized it since, then i'd just need to see what you have to try and offer any amount of support.

from cmb2-snippet-library.

paolosax avatar paolosax commented on May 27, 2024

...yep, is this one with no personal customization. ANd I didn't noticed how "old" it was...
But right now I'm just testing for solutions in widget dev - and I'd like to leverage on CMB2 power...

from cmb2-snippet-library.

tw2113 avatar tw2113 commented on May 27, 2024

Noted.

One thing I'm seeing is that despite having an image field set up, the example code doesn't actually use that field at all in the widget output. So it's not so much that something is broken, it's just that it doesn't utilize every field provided in the output. Also since these are meant to be snippets and customized to one's needs, not the end of the world.

from cmb2-snippet-library.

paolosax avatar paolosax commented on May 27, 2024

OK Michaeal, got it - very kind as usual...
...in fact I admit that I didn't thoroughly checked the whole code, as I thought that these was tested and working example snippets, to be considered as a starting point (I mean, I thought these was sort of "official" snippets lib coded & suggested by CMB2... but now I've just read the "Notes" section in the CMB2-Snippet-Library Read Me...)
;)

from cmb2-snippet-library.

tw2113 avatar tw2113 commented on May 27, 2024

It's in the weeds of nitpicky details, but in part it depends on what you define as "tested and working". For example the use, or lack of a use of a created field, in some widget output doesn't constitute that this isn't tested or not working in my mind. The primary purpose of the snippet is to show how to use CMB2 in a widget as a whole, which I believe it's doing still. If it was causing a fatal error that we could easily prevent with some guard statements or similar, then that would definitely be considered "not working" or "not tested extra thoroughly", and need updated/addressed.

On the flipside, I could also see some need to consider removing the non-used field as it's just adding what I'll call code noise.

from cmb2-snippet-library.

Related Issues (20)

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.