Page 1 of 1

CXP compile error on html page

Posted: Tue Oct 26, 2021 8:05 am
by Sbryan
I've been away from programming a few years but now I'm looking at writing a web based program for internal use using CXP on IIS. I've done something similar in the past but this time I'm using the Tabler dashboard template for the framework. I've downloaded and installed Tabler along with the other necessary programs to get it running and have it generating the dashboard html code with no problem. The next step will be adding CXP code to pull from a database to populate some of the screens. I can get it to run under cxp by changing the html extensions to .cxp and most all pages compile just fine and work with no problem except for a few.
On a few pages I get a CXP:BuildError but the errors make no sense because they are always the same "Linker: error XBT0200: Syntax Error in Line 25". I've tried eliminating lines trying to figure out what is causing the problem but nothing I've tried seems to work. These pages are very simple and there are more complex pages that compile with no problem.
I've pulled one of the pages I'm having an issue with along with the original html file, images, and css so you can see what it is supposed to look like.
Can someone with CXP set up run the sample to see if they get the same compile error and help figure out what is causing the problem? I thought that maybe it's because I'm running an older version (foundation build 840) but if that was the case then why does it work fine on other more complex pages?

If anyone can help figure this out it would be greatly appreciated.

Re: CXP compile error on html page

Posted: Wed Oct 27, 2021 6:21 am
by Sbryan
I figured out what the problem was but not sure why it's happening.

For some reason, CXP doesn't like something in the name of the file auth-lock.cxp. By just changing the name to something else it compiled and ran as expected. At least I know what to look for when I see this problem again.

Re: CXP compile error on html page

Posted: Wed Oct 27, 2021 6:48 am
by Sbryan
After a little more testing it appears that any file name with a dash "-" was causing the error. All the files I was having issues with happened to include a dash. After changing the names, everything is working as expected and I can now move on to the next steps.

Re: CXP compile error on html page

Posted: Wed Oct 27, 2021 7:44 am
by Tom
BTW, I love the "tabler"-framework. But we use it with Xb2.Net.

Re: CXP compile error on html page

Posted: Wed Oct 27, 2021 8:24 am
by rdonnay
Do you have a URL that I can click on to run it on your server?

I downloaded your files.
After a little more testing it appears that any file name with a dash "-" was causing the error.
I think I recall problems with file name problems, even case sensitivity with Apache. I don't use IIS.

Do all the CSS files need to be renamed too?

Re: CXP compile error on html page

Posted: Thu Oct 28, 2021 5:40 am
by Sbryan
Hi Roger,
Do you have a URL that I can click on to run it on your server?
No, currently I'm running it on a local development machine.
Do all the CSS files need to be renamed too?
If you are referring to the sample I uploaded, then no. If you just change auth-lock,cxp to something like authlock.cxp then it will compile properly.

The dash "-" issue may have been addressed in a later build because I noticed on the Alaska documents page they have a sample with a file name that includes a dash.

session-form.cxp and session-save.cxp

This causes an error with my build unless I change the names.

https://doc.alaska-software.com/content ... ement.html

I've wondered what other updates to CXP they have implemented since build 840. Is there a change log anywhere?

I highly recommend the Tabler framework for anyone wanting to build applications for the web. It offers a lot of nice features and once it is set up properly, you can easily build (or change) a framework for your application and then add CXP code or Xb2.net) to make it do what you want.
https://preview.tabler.io/