Duplicated Element IDs code view synching to design view

No, please don’t get me wrong. I’d just like to see a toggle for on/off allowing the user to decide over the software. I have older DMX Zone code in a lot of pages, JavaScript especially. Wappler is highlighting this code as well as other code that has no errors. Error checking is causing a huge issue with many pages not syncing during code editing. I do appreciate error checking but I’d just like some control over it. No other editors do this… There must be a reason for that…

:wink:

The reason probably is simply to let Wappler work well. I think, all these checks are necessary for Wappler to sync code & design view.
Instead of turning it off/on, it would be better to report the incorrect errors so that Wappler can be updated to be more accurate.

From what I understand about Wappler - the issue with toggling it off would be that, in case you actually break something, you will have no way to know the cause. Even if you re-enable error checking, all your previous errors/warnings will show up along with actual issue. In the end, making your life harder.

And the reason why other editors don’t do this is probably because there is nothing out there like Wappler. :sweat_smile:

I do report these issues.

No there is not anything like Wappler. It doesn’t make error checking issues go away though. I’ve been writing html since 1998 or around then… I’ve seen a lot of editors. Seriously this error checking / babysitting issue is a problem which to be frank is unnecessary. If you want to use error checking turn it on, if you don’t want it or find it stalls your work-flow, generates false positives, and all together takes away the ability to sync two views together… DISABLE it all together in settings by choice.

:joy:

Last resort is @George or @patrick . Maybe they can explain why it is the way it is and give a solution.

Amazing team here at Wappler always open to a comprise/solution. But I appreciate they have a huge workload and far more important things to do.

1 Like

We have to do strict error checking because we are using the browser DOM.
So if you have a bad html - and that goes into the browser dom - the browser will “fix” it and will make all the additional tags required to do so. So you will get a lot of additional tags to make it “good”

we had this in the beginning and resulted in a lot of issues with corrupted code afterwards.

So that is why we stick to the save route and do synching only when the html is already valid.

Do note that we have already improved that so minor errors like double ids, attribute case, missing files - don’t count.

So only very bad structural html errors (unclosed tags or wrong nesting) will prevent synchronization.

So it is for your own safety :slight_smile: and should work just fine now.

1 Like

Almost all errors shown in Wappler are informational, they don’t effect the working of the design/code view. The only errors that prevents the syncing between the 2 views are when you edit in code view and the code has invalid html like a tag that is not closed.

We have a page with two warnings about ‘eval’ (inserted by DMX Zone Static Event in DW) and one duplicate ID tag. Syncing does not work on this page. We amend the page removing the ‘eval’ JavaScript and change the ID to a unique value and syncing is still hit and miss. There are no open tags in the page nor any other errors, JavaScript or otherwise.

:frowning:

Could you attach a screenshot? of the warnings

Here you go George,

2019-02-08_20-00-09

and of the corresponding code :slight_smile: please


function MM_goToURL() { //v3.0
  var i, args = MM_goToURL.arguments;
  document.MM_returnValue = false;
  for ( i = 0; i < ( args.length - 1 ); i += 2 ) eval( args[ i ] + ".location='" + args[ i + 1 ] + "'" );
}
function MM_callJS(jsStr) { //v2.0
  return eval(jsStr)
;}

damn - that is year 2000 code! get rid of it quickly! :slight_smile:

2 Likes

I know (it is DMX Zone code). That is what I am slowly doing with a backlog of old projects. But according to Patrick this should not stop syncing…

No it is NOT DMXzone code - it is old Dreamweaver code …

(hence the MM prefix - from Macromedia …)

you really should get rid of it:


I’m aware of the issues with this code that is why it is being replaced. Even if it is removed no syncing takes place. Macromedia… Damn… Used to sell them monitors years ago!

:slight_smile:

2 Likes

Well there you go problem solved :slight_smile:

And if you need redirect just use the app connect browser control and call its goto action

Hundreds of pages lol… :smiley:

Oh well we all enjoy it, lets admit it, it is why we are all here after hours still working!

:smiley:

Right after a massive cleanup of all code I can confirm that duplicate ID’s do effect syncing between Code and Design View. I have one duplicate ID which is no problem, I’ve changed it to unique. But unless this duplicate is changed sync fails. Once changed everything works as it should.

Could you produce a minimal page, showing the problem Dave?

So we can load it and see exactly the problem.