Tutrial Managing Relational tables not working
Following tutorial Managing Relational Tables in Data Bridge line by line with 'new, empty' site and supplied DB tables.
Everything ok until I get to the section titled Add variables to the pages. The only instruction step here to set this up is to clear the go to field after selection - which was already empty - no mention of setting it to the correct table (items - it defaulted to countries?) or to set a PK link - which is required.
At this point - reading the text, seems to have no correlation to what we are actually doing in the numbered step by step section (add a variable to each page to allow MRTSB to know which items are being updated) - step by step instructions followed exactly - 1) - per instructions, not using webassist insert or update, but dw built in ones(which is fine, but seems odd), 2nd - it took a long time to discern that the table to use is items (it auto set to country table) 3rd - there is no link or variable being used to define which item to update in either steps - insert page went ok (as it is inserting a new item) but the update page errors on insert update - there must be at least 1 primary key defined - according to the tut text and just common DB knowledge, I know that for updates, we usually pass this thru the URL - this whole tutorial was supposed to show the way to do it with a session variable, but nowhere (at least up to this point in the tut) is this variable being bound on the update page, which causes the insert update to fail -no primary key defined -- bringing the whole exercise to a halt. but nowhere in the steps below (or above for that matter) is this done. I could not add an update to this page.
SO... just for fun, I set the value for the primary key to the WAUpdate Record ID (I have no idea where this variable came from - assume wa built when the page built and that it contains the id of the record to update) and bound this to the id field and set as primary key for the update. This finally allowed the update code to be inserted on to the page.
I wanted to test this - and my usual method of testing on updates without a link in page sending the item id is to change the record to update from a default of "-1" to a valid record id - like id 1.
When the page is run, record number 1 does appear in the fields (so far so good) - and I just changed the name of the item and clicked update -
Which generates the following error - Warning: Header may not contain more than a single header, new line detected. in /Applications/MAMP/htdocs/wa_eotsTesting/items_update.php on line 107.
This is the code around and including line 107---
if ($WA_keepQueryString && $WA_redirectURL != "" && isset($_SERVER["QUERY_STRING"]) && $_SERVER["QUERY_STRING"] !== "" && sizeof($_POST) > 0) {
$WA_redirectURL .= ((strpos($WA_redirectURL, '?') === false)?"?":"&").$_SERVER["QUERY_STRING"];
}
header("Location: ".$WA_redirectURL); <------this is line 107
}
}---
I researched this in the forums and found some mention of this - of course with the resolution of - "ticket opened". Also a note that if anyone else get the message to report it (Which I am doing now).
It is a perfectly valid testing technique to change the default '-1' to a valid id number as long as you remember to change it back (or else the only item ever updated or shown would be id 1 or whatever is supplied) - I have used for years for testing. I do not think this is causing the error unless it is messing up something in your code (but it really shouldn't be).
I don't think you need to see the page code - just follow step by step your own tutorial - I would be shocked if anyone can get the update page to work - as it refuses to insert the update without knowing where to get the primary key - which is never mentioned in the tut in any preceding text except stating that this is what we are doing in this section.
I was following your brand new tutorials to try and understand some of the new changes and abilities of dataassist - And once again, as with sooo many of your tutorials, it doesn't work (and this is a super basic, brand new, primer course tut). I cannot tell you how frustrating this is - following a buggy tutorial - makes learning almost impossible. The only FAQ answer you have is - ticket opened - and now it all just stops with me being more confused then I was before the tutorial and trying to figure out a way to circumvent the issues this generated.
The only thing I noticed was that it seems there has been some upgrades to datassist recently (which I was not informed of (I was with all the other updates before) - but I reviewed the change logs and there is no mention of anything to do with this issue.
I will attempt to waste another afternoon uninstalling my current version and updating just to verify, but this is like the 3rd or 4th update that you have had me do for datasssist - and I have honestly spent more time installing and unistalling these extensions then I have actually using them. And the best part - I paid a very large sum of money for this time saving gem.
I really hope I am just missing something, but when you start with a fresh DW CS4 site and your supplied database - and follow a tutorial step by step- and the tutorial fails halfway through - We'll I hope you can understand my frustration -
And one last gripe - just to type this in, I have had to do like 5 captcha retries - as I have mentioned before - the required captcha input on these thread pages is almost unreadable. - 1 word is always semi clear, but the other is almost like smeared across making the letters unreadable.- I understand, like, and use captcha - but have never had to try so many times just to get a message thru - making writing on these forums almost unbearable.
I do not think you need my code - as it is 100% directly done step by step from your tutorial. I cannot believe that I am the only one that has gotten to this point (and this is just 1 of the 3 supplied tuts you sent out today) in this tutorial and has had a problem. I keep checking that I didn't miss a step, and I understand very well how an sql update works and what is required. As I said - I was doing this to learn how data assist does this. I followed this tut step by step - but DW will not insert update code without knowing that PK field - and the steps don't seem bind it in or account for it (even though a variable seems to be setup for it).
Any ideas?
I also have attached a screen shot of the captcha field for this post - I ask anyone - tell me what characters those are - it is 100% impossible - the first word is nothing but some black marks and outside of the box- yes I understand the refresh, but still - many of them look just like this - unreadable. Just submitting this issue is annoyingly difficult.
Mike