Hi Rick,
I have a problem with Your sample step by step guide >>Getting Started<<. I wanted to check how the ww template technique works and worked through the guide until step 6.
There I got an error and found out that the necessary template EditCustomer.wp
was not part of the project.
So I copy the html code from Step 6 into a file EditCustomer.wp
in the directory "web". Result: OK, the method ExpandTemplate is using that template, but …
... no bootstrap ... no header ... not the expected but a very basic look ... and below is also an error:
< % ERROR: = HtmlBindingError("Entered",poErrors) % >
Looks like EditCustomer.wp calls a folder "~ / bower_components /…“ that doesn't exist on my computer. So I checked the zip file You mentioned in https://webconnection.west-wind.com/docs/_0nb1al6fm.htm : >>You can find the sample code for the completed projects at the following GIT BitBucket repository: … You can .. use Download Button to grab a Zip file of the completed project folder. But it looks like the template file there would not be a current version. Can You please provide me with the missing files or tell me what to do next?
Thanks Hans
I think you figured it out actually. You're correct, there's no bower-components
in recent updates. all those files have moved to a separate folder in ~/lib
- the samples have not been updated.
In the EditCustomer.wp
template and later in the _layout.wcs
template. You'll need to change the links.
The idea is though that if you followed along you were creating the pages through the tooling in Visual Studio or Visual Studio code which will put the correct links into the pages.
I'll update the walk throughs - it takes time to get those in sync with the actual updates.
+++ Rick ---
I'm not really sure where the Bower references are coming from. AFAIK the walk through already uses ~/lib
folders (I guess I did update those) and the latest templates in Web Connection in 7.12 at least also already have the ~/lib/
bindings. So not sure where the bower-components
links are coming from unless you started with this a while ago and are picking it up again after updating to the latest version of Web Connection with the updated default dependencies.
+++ Rick ---
Hi Rick,
You write >> I'm not really sure where the Bower references are coming from.<<
I go after Your step by step guide and in Step by Step: Getting Started , Step 6 https://webconnection.west-wind.com/docs/_sap14y146.htm I copy the code shown after >> The following is the full HTML for a EditCustomer.wp template we'll use to edit a customer:<< into a file EditCustomer.wp in the directory "web" . And there also today was code as
<link rel="stylesheet" href="~/bower_components/eonasdan-bootstrap-datetimepicker/build/css/bootstrap-datetimepicker.min.css" /> <script src="~/bower_components/moment/min/moment.min.js"></script> <script src="~/bower_components/eonasdan-bootstrap-datetimepicker/build/js/bootstrap-datetimepicker.min.js"></script>
Where else can I get gehe nessessary file editcustomer.wp?
Thanks
Hans
P.S.: I updated today from 7.09 to 7.13 but mno change of behaviour
Ah yes I see it now...
To be clear. That page is not actually a self-contained page. It lacks the styling in the headers. For that use the templates in Visual Studio or Visual Studio code to create the new page...
I see now that that's not mentioned in this topic for some reason... fixing now.
I really need to go over those walk throughs with the latest bits - they do get out of date, but there's so much of the documentation to go through so it's slow going. Only so many hours in the day 😦
+++ Rick ---
I've updated the Getting Started Walk Through.
There are quite a few changes to reflect the update templates and dependencies as well as some code improvements with newer features.
I've also uploaded the completed project to GitHub:
WebConnection-WebDemo on GitHub
A lot of work going through this, but well worth it for this initial walk through.
+++ Rick ---
Hi Rick, thank You very much. I know help pages are a nightmare. Some minor hints/questions:
- Step 5 , first screenshot: Customer should not be >>ShowCustomer.wp?id=_4FG12Y7TX<< but >>Avionics, Inc.<<
- Step 5, at the bottom: This Link >>Step 6 - Scripts and Templates and Setting up an HTML Editor<< does not work
- Step 6, from the menu: links to step 7. There is only step5, step7 and step8 … no step6
- Github repository: the link you sent me https://github.com/RickStrahl/WebConnection-WebDemo/ gives back a 404 error…
- (The Link on Step By Step: Getting Started Start Page worked …)
- I copied the EditCustomer.wp Page from the ZIP
- When running http://localhost/WebDemo/EditCustomer.wp?id=_4FG12Y7TX, I got an error message in editcustomer.prg:
-
- Response.Write(TRANSFORM( EVALUATE([ HtmlBindingError("BillRate",poErrors) ]) ))
-
- Program Error: Variable 'POERRORS' is not found. .. and .. right .. we have only an object poerror but not poerrors
-
- Which one should be used? poerror or poerrors?
Thanks Hans
P.S. Sorry I am not that used to Markdown, but I try to learn
Please fix this message so it's readable. You can edit this message. There's a preview on the bottom so you can see what you're about to post before you do...
You need to add blank lines between new lines.
Thanks,
+++ Rick ---
Hi Rick, * today I tried to use the completed project (You remember? Your Link https://github.com/RickStrahl/WebConnection-WebDemo/ gave me a 404 so I used the the link on Step By Step: Getting Started Start Page that worked)
I renamed my c:/wproj/webdemo to webdemo_200715 and copied the whole content of RickStrahl-webconnection_stepbystep_samples-1ffadb1f224c to c:/wproj/webdemo
I started Foxpro and run c:/wproj/webdemo/launch
-
- Launch.prg was missing, I copied it from my old project
From the Browser I run http://localhost/WebDemo/testpage.wp and got a
-
- Server Error in the app /webdemo: Unhandled Exception
-
- The file or assembly "WebConnectionModule" or a dependency thereof was not found. The system can not find the stated file
I checked WebConnectionModule.dll and found 2 in c:/wconnect/template/scripts and c:/wconnect/web/bin
Any hints what I can do next?
Thanks
Hans
Not sure why that gives you a 404 from the github link - it works right from the link you have here.
https://github.com/RickStrahl/WebConnection-WebDemo
I think the problems you had in the first message are because the page needs to be hard refreshed - you're describing old images not the updated ones as far as I can see. Press Ctrl-Shift-R to force the page to refresh completely perhaps.
Honestly I don't know what you're doing that would cause this unless you're not starting the project out of the correct folder or don't have the environment set up properly (ie. missing paths, server not configured).
Launch.prg
is in the Github repo so it's definitely there. Look here:
https://github.com/RickStrahl/WebConnection-WebDemo/tree/master/deploy
When you 'copy' a Web Connection application that application has to be configured to run - at least on IIS. If you're using IIS you need to configure the Web site.
The module files are there:
https://github.com/RickStrahl/WebConnection-WebDemo/tree/master/web/bin
If you're running IIS you need to configure the Web site. Run do webdemo_serverconfig.prg
(you need to run as Admin) in the deploy folder to configure IIS for the application.
This project wasn't meant to be a turnkey solution - it was meant as a helper to provide you with some of the files that require a lot of code so you don't have to type it all in. That said it's self contained and it works, but it won't 'just work' without setting up the configuration/web server.
The walk through is meant to make you actually go through the steps. At minimum go through the steps to create the project which will set up IIS (if you're using that) or IIS Express or the Web Connection Web Server (.NET Core). The latter is useful because if you use that once .NET Core SDK is installed no further configuration is needed for any application.
+++ Rick ---
I've added instructions for configuration for this project in the README.md file.
Web Connection Web Demo Walk Through Code on Github
Just to be sure I also cloned the project and started it up. It should run now.
There were a couple of missing things but they were non-consequential. Mainly the temp folder and some missing JS libs. That's been fixed (and also fixed in the base New Project template now).
+++ Rick ---
Hi Rick,
thank You for Your patience.
I tried again to reach Your repository https://github.com/RickStrahl/WebConnection-WebDemo – got again a 404
Tried on 3 different browsers – no success
Tried https://github.com/RickStrahl - got an overview and a list of 95 repositories, but no WebConnection-WebDemo …
Tried it signed in and signed out – same result
Same when I try to reach that repository via https://webconnection.west-wind.com/docs/_0nb1al6fm.htm
You are shure that this repository is not private?
Thanks, Hans
I don't understand why that doesn't work. Are you clicking the link in this message?
--- snip ---
Duh! Alright now I feel like an idiot. Sure enough the repo was private and of course it works for me since I'm logged in.
I didn't intend to create the repo as Private but apparently the default is private through the interface I used (GitHub Desktop).
My bad. You should be able to get to it now.
+++ Rick ---