B4J Question [SithasoDaisy5] [error 22] Creating your 2nd MySQL CRUD WebApp using REST API With API-Key (Php) - FamilyTree

rabbitBUSH

Well-Known Member
Licensed User
Sorry @Mashiane I've been trying to get this to run.....frustration.

Log shows many of these :
[ERROR 22]: [pgFamilyTree,loadpeople: 415] sduimysqlrest(METHODVAR) is not supported in BANano!
[ERROR 22]: [pgTreeSpider,mountpeople: 94] sdui5app(GLOBALMYCLASSVAR) is not supported in BANano!
[ERROR 22]: [pgIndex,initialize: 15] sdui5app(GLOBALMYCLASSVAR) is not supported in BANano!

Also, I had to change the path configuration so that the Additional Libraries points to
C:\Users\RabbitBush\Documents\Additional Libraries
Not the Additional Libraries in the C:\Program Files\Anywhere Software\B4J\Additional Libraries

It turned out as well that the SithasoDaisy5 library was not on my bookshelf - so had to figure that one out.

This is B4j 10.2 BTW.
BANano 9.11 just added this night.

I get the Laragon index page but its blank......
 

rabbitBUSH

Well-Known Member
Licensed User
simple path configuration
There must have been some sort of change . What you wrote is what I did, then, had to search for solution and found the post saying change the configuration under Tools to the user/ space. That solved that issue.

But the error 22 took a while to realise I wasn't going to get to that successfully.

Not at home now so will go on your above info and let you know - this BANANO - AI AI ai......mywê.......
 
Upvote 0

rabbitBUSH

Well-Known Member
Licensed User
So, progress - have these things sorted out now as queried in #1 - not too sure what corrected it, but anyway.

the next issues reported here are not @Mashiane problems, but, I thought i would just record them here for other readers encountering similar or same issues.

the subtitles are just the names of the github folders.....for easy reference.....

MySQL REST API Family Tree

Got the page loading and the data (person) entry form as well. then - well - i thought that Mysql is loaded here so have to figure that out because it just says that the person has not been created/ updated- so the error messages are working......and so is Laragon. I need to figure out getting Mysql going so that Laragon will hook it etc etc.. Well, maybe an error message that says Not MySQL database created yet (or something).... :rolleyes: actually, i just remembered it loads the landing page and says no data provided! [took a moment for that penny to drop].

SithasoDaisy5 MySQL REST API PHP

when i ran this one I got this error - which seems to be coming from FireFox. ja, haven't tried it in another browser. Current FF has some strong issues with some things, for instance, running dylanradio.com loads but the media player won't work anymore. so this appears to be a new thing in recent updates. that same media player runs in Chrome and Opera no problem - how to figure out FF's stuff has been a challenge.

don't know enough about this error yet to challenge it.

error message
Secure Connection Failed

An error occurred during a connection to 127.0.0.1. SSL received a record that exceeded the maximum permissible length.

Error code: SSL_ERROR_RX_RECORD_TOO_LONG

The page you are trying to view cannot be shown because the authenticity of the received data could not be verified.
Please contact the website owners to inform them of this problem.
 
Upvote 0

Mashiane

Expert
Licensed User
Longtime User
Please first read the 1st tutorial as it gives some green lights on the initial setups and steps and what should be done. The intention was that people will read these in sequence.


Anyway...

1. I am using Laragon 6 as my dev environment. This comes with MySQL. On its menu, Apache, one is able to Enable SSL.

With the gear button, one is able to get to the config screen.

This is my setup and Nginx I still need to understand how it works.

1745391780057.png


2. The .sql file to create the database is in the download of the project. One needs to import this with phpmyadmin. This creates the database and the tables, its not an automated process.

3. You will also need to update the api.php file to update it with your settings for the mysql connection. This is discussed in the 1st tutorial.
 
Upvote 0

rabbitBUSH

Well-Known Member
Licensed User
Thanks O wizard enkulu, I'll go through the first example link again see what I missed, and the above. I hunted around for the chain of examples but probably found them in 37421 order not 1234 order.

I concluded that Laragon wasn't the issue as well and that some other steps were missed. A bit like hopscotch, you know, when you chuck the marker into a square and then have to jump over that one.

Will let you know when your instruction leads to matriculation.
 
Upvote 0

rabbitBUSH

Well-Known Member
Licensed User
now i have a message that says the Person has been created - i think that is spurious because of : (but still - a little progress).

i've been through the first tutorial and covered all but this :
5. In our project, we update the categories.php file. This is the rest api file the app will use.
From line 12765, update the stock.php file to use the credentials to connect to your database.
can't find the categories.php file anywhere in the folders for any of the family tree project examples. found and updated the stock.php, though.

wondered whether that categories.php is a typo or .......

am figuring out the phpmyadmin part for use as a localhost entity. obviously that will set up the database - although i am not intending to the stock.sql and hoped to create a new familytree.sql.

plodding on.
 
Upvote 0

rabbitBUSH

Well-Known Member
Licensed User
OMG 🤯

A marathon just elapsed........

I had to do a bunch of hacking - and shouting at a few of the ducks - and now I have just one that is not in the line. (I think/hope.)

Thanks for the assists in the previous posts @Mashiane 👍. (one day well meet, remind me to buy you i-bhere).

1.
Figured out getting Laragon to hook phpMyAdmin and eventually got the SQL imported. This ended up being an unnecessary challenge - because, I had not noticed that Laragon was using an old version of MySQL (5) and when I updated Laragon from 5 to 6 it inserted MySQL (8) but did not expunge the previous. I had to remove that (M5) and just leave the one updated version (M8). I add this comment because the .SQL wouldn't import properly and complained A Lot about a number of things. The update got things working.

Moral of that story - don't we all believe this but never do it - check you have the updated versions of your stuff.

Then, of course, working with the .sql there was that darned semi-colon!!!!!

2.

So - - - now I have the database working and accepting new entries. Haven't tried to delete anyone yet.

What I don't have is the NICE (call it the wireframe if you like) picture of all the relationships which I suspect should appear on the landing page of the SW.

Pretty pleased to have reached this far - since I am currently working on family tree (genealogical) things.

The pretty picture will have to wait for another time - gotta hit the sack now.......

be back when i get that going........
 
Last edited:
Upvote 0

Mashiane

Expert
Licensed User
Longtime User
Awesome, happy for you.

In the Tutorials > Projects > MySQL REST API Family Tree, we have the sql file for the family tree. The schema of the db inside familytree.sql is based on the *preference dialog* design on ths preference schema.json file. This can be used to change the UI of the app to capture the details of family members. If you happen to change the schema (using the preference builder), you generate the code for the page. This will give you a new SQL command to create your table. I think its just better to manually update a table schema in such cases.

1745481443962.png


The first part of this tutorial below explains how one can start developing apps using the preference dialog, thus explaining how we started to create the FamilyTree WebApp.

It will be extended for automation to conclude it.

 
Upvote 0

rabbitBUSH

Well-Known Member
Licensed User
Hiya hippies,
I have that side of it running. The bit I don't have is the organogram (must be to do with tsOrganogram things not hooking properly). Meaning that the landing page is blank. As the image below dingus.

Taking a breath or two tonight so will fire it all up after tiling operations tomorrow and investigate the various examples for clues.

You are, of course, welcome to issue strong directives in the mean time, and alleviate the rural community of more pain and suffering.

🙏

1745522423174.png
 
Last edited:
Upvote 0

Mashiane

Expert
Licensed User
Longtime User
Hiya hippies,
I have that side of it running. The bit I don't have is the organogram (must be to do with tsOrganogram things not hooking properly). Meaning that the landing page is blank. As the image below dingus.

Taking a breath or two tonight so will fire it all up after tiling operations tomorrow and investigate the various examples for clues.

You are, of course, welcome to issue strong directives in the mean time, and alleviate the rural community of more pain and suffering.

🙏

View attachment 163618
The image you have posted is the project that inspired our version of the family tree.

The version of our family tree you will see on this app will look like the one below.

1745523574420.png


And the "tree" is built when you capture family members and then specify a father and or a mother. This is on Family Records.

1745523646879.png


When you add / update a family member, the preference dialog shows

1745523731284.png
 
Upvote 0

rabbitBUSH

Well-Known Member
Licensed User
And the "tree" is built when you capture family members and then specify a father and or a mother.
O!o!o!o!o!o that wasn't intuitively obvious. I stopped working with it when I found I had successfully activated the DB. Didn't think that entering Mom and Pop would be the immaculate solution.

Will give a whizz just now.

eNkhosi wizard.
 
Upvote 0

rabbitBUSH

Well-Known Member
Licensed User
The version of our family tree you will see on this app will look like the one below.
Hello again Mashy, still can't figure out why this is not appearing.

The pgTreeSpider module doesn't seem to be firing, or, if it is, then the tsOrganogram isn't loading, or something (see #10 again) ..... Just get a blank page with the hamburger title bar, the drawer menu works and the people page is correct.

something is missing.....but haven't the tools to figure out what at this point.

🤔
 
Upvote 0

Mashiane

Expert
Licensed User
Longtime User
Hello again Mashy, still can't figure out why this is not appearing.

The pgTreeSpider module doesn't seem to be firing, or, if it is, then the tsOrganogram isn't loading, or something (see #10 again) ..... Just get a blank page with the hamburger title bar, the drawer menu works and the people page is correct.

something is missing.....but haven't the tools to figure out what at this point.

🤔
Press Control + Shift + I and see what is on console log. Also just check if there is any sinister log in b4j.

It should load as soon as it finds records in the db and builds the tree based on relationships. If you go to the Family Records, does it show records that you have captured? Perhaps there is some misconfiguration with the DB.
 

Attachments

  • 1745647806388.png
    1745647806388.png
    12 KB · Views: 25
Last edited:
Upvote 0

Mashiane

Expert
Licensed User
Longtime User
My apologies for the inconvenience. I have created a new thread that talks about this project and how to get it running. Please use the latest version of the FamilyTree from Github. You will find it in the tutorials folder.


All the best.
 
Upvote 0

rabbitBUSH

Well-Known Member
Licensed User
Press Control + Shift + I

Doesn't seem to be much of interest there: a few warnings and one error.
WARNINGS
The browser build of Tailwind CSS should not be used in production. To use Tailwind CSS in production, use the Tailwind CLI, Vite plugin, or PostCSS plugin: https://tailwindcss.com/docs/installation

Empty string passed to getElementById().

Source map error: Error: request failed with status 404
Stack in the worker:networkRequest@resource://devtools/client/shared/source-map-loader/utils/network-request.js:43:9

Resource URL: http://127.0.0.1/familytree/scripts/tailwind.min.js
Source Map URL: /sm/0484e182646765791ab67efd1fae58cdb41b3390b5dacd1930759b1eb586ef0d.map

ERRORS
http://127.0.0.1/familytree/assets/favicon-16x16.png (404 - not found)

Also just check if there is any sinister log in b4j.
I've been checking that log all along. What it had was a bunch of unused code that it listed. Recommended switching this BANano.TranspilerOptions.RemoveDeadCode = True ' false - those lines still appear in the log and it ends with :
BANano detected over 1131.6KB of UNUSED TRANSPILED CODE in the WebApp!.....

My apologies for the inconvenience.
No worries.
Please use the latest version of the FamilyTree
Unless you have posted a new one in the past day or so then its the latest. Loaded this lot round about Monday last.....
 
Upvote 0
Top