Issue with @jonl1/wappler-ac-cookie-consent extension

Hi everyone,

does anyone know what I’m doing wrong with with the cookie consent extension? I’m getting a “TypeError: thisq(…) is undefined”-error in the browser console and the modal doesn’t show up. I’ve added it to a new project, so there isn’t really much I could have done wrong, I think.

<dmx-jonl1-cookie-consent id="consent1" dmx-bind:categories="{necessary:{enabled:true,readOnly:true}}"></dmx-jonl1-cookie-consent>

grafik

Thanks
Sebastian

I can’t reproduce.
Are you using app connect beta?

Yes, using the beta. It worked a while ago, when this first came out, I tried it.

My extensions have not been checked against App Connect 2.0-beta and probably won’t be until we get a Release Candidate of App Connect 2.0

@patrick any ideas when that could happen?

We hope that we can release App Connect 2 with Wappler 6, which we will start releasing in Beta soon.

The new App Connect has some API changes, it seems that you have an init method, this is also one of the new methods in App Connect components. For the init method you probably want to rename it to _init in your component.

New methods in app connect 2:
init(node) for initializing the component, the node is being passed. Method is called before the render method.
performUpdate(updatedProps) is the new update method, it is called when any of the props is updated (has a new value). Only the update on the component which prop was updated is called, in previous App Connect it would call the update of all components when some data changed.
$watch(expression, callback) allows you to watch an expression and callback gets called with the result every time the result is being updated.

Deprecated methods in app connect 2:
beforeUpdate(fields)
update(props, fields)
updated()
These are still available in the Beta, but should be replaced with the performUpdate method.

Also not use dmx.requestUpdate anymore, this will also become deprecated, if a prop or data value updates from a component it will trigger its update automatically and no global update is triggered.

1 Like

@patrick Is there a comprehensive list somewhere of changes with appconnect 2?
So we know what to change when it comes to extensions?

The above reply list all changes, the deprecated methods already have been removed in the latest versions. The update method is now performUpdate, this is the biggest change. Also dmx.requestUpdate() is removed, when the properties of a component are updated through its bindings it will trigger the performUpdate method of that specific component. It is not possible to trigger an update for all components on the page.

1 Like

@patrick are these updated automatically when switching to AC 2, or do we need to manually update all of these ourselves?

All our extensions currently in Beta have been updated for App Connect 2, only if you have created your own custom component you will need to update it.

1 Like