Products

Solutions

Resources

Partners

Community

Blog

About

QA

Ideas Test

New Community Website

Ordinarily, you'd be at the right spot, but we've recently launched a brand new community website... For the community, by the community.

Yay... Take Me to the Community!

Welcome to the DNN Community Forums, your preferred source of online community support for all things related to DNN.
In order to participate you must be a registered DNNizen

HomeHomeGetting StartedGetting StartedNew to DNN Plat...New to DNN Plat...VIEW.ASCX Not DisplayingVIEW.ASCX Not Displaying
Previous
 
Next
New Post
12/28/2012 1:43 PM
 

Wow, wow, wow...

I've spent the better part of a week spinning my wheels, trying to figure out how to get a simple informational message back to  VIEW.ASCX to display the contents of the ContentItemId field from CONTENT.CS.

Well, I never did get a message back to VIEW.ASCX (lblMessage won't work, MessageBox won't work, DotNetNuke.Common.Globals.NavigateURL() will work but you can't display anything, etc., etc.).   I then tried to get HttpContext.Current.*, System.Debugger.*, etc to write debugging messages to the OUTBOX in VS 12 Web Developer, but I never found any of those messages.

But I finally DID get TEXTWRITERTRACELISTENER to work using the following code:

// set up listener

string filename = @"C:\Users\Jeff McVey\Desktop\listener.txt";

FileStream traceLog = new FileStream(filename, FileMode.OpenOrCreate);

TextWriterTraceListener listener = new TextWriterTraceListener(traceLog);

// output to listener

listener.WriteLine("objContent.ContentItemId 1:" + objContent.ContentItemId.ToString());

// Add Terms

var cntTerm = new Terms();

cntTerm.ManageTaskTerms(objTask, objContent);

// output to listener

listener.WriteLine("objContent.ContentItemId 2:" + objContent.ContentItemId.ToString());

// flush any open output before termination

// maybe in an override of Form.OnClosed

listener.Flush();

listener.Close();

*****************************************************************************************************

Output file contains:

objContent.ContentItemId 1:501
objContent.ContentItemId 2:501

(I also visually verified its presence as 501 in the CONTENTITEM file.)

You'll notice that I sampled the value of objectContent.ContentItemId BEFORE and AFTER it went down the rabbit-hole of cntTerm.ManageTaskTerms().

Looks like objcontent.ContentItemId retains its value in and out of that rabbit hole, but I don't necessarily know that it is used to write the final value to the CONTENTITEM file, so I'll have to go down that rabbit hole myself to see what does.

More later, as it happens.  I think this is all for today.

Jeff 

 

// System.Diagnostics.Debugger.Log(0,null,"objContent.ContentItemId 2:" + objContent.ContentItemId.ToString());

 

// System.Diagnostics.Debugger.Break();

 

// System.Web.HttpContext.Current.Response.Output.Write("objContent.ContentItemId 2: " + objContent.ContentItemId.ToString());

 

 

 
New Post
1/4/2013 4:48 PM
 

SUCCESS !!!

I won't bore you with the details, but suffice to say that I've climbed mountains, forged rivers, endured deserts, descended into canyons to figure this VIEW.ASCX problem out... ; - )

Long story short, I noticed while looking at the TASK_UPDATETASK procedure this morning that the update procedure was filling the CONTENTITEMID file with a -1.   Hmmmm.....   

So I replaced the -1 with @CONTENTITEMID, and VOILA, it works !!!

The DELETE function also works, but the EDIT does not....  So I've got a little bit more to do before I'm through.

THANKS FOR YOUR HELP, BILL !!!

Jeff

 

 
New Post
1/5/2013 3:25 PM
 

Whew, that last one (NavigateURL ()) was interesting, and a bit challenging, but found a couple of Internet examples that helped me...

Took me a while to realize that DotNetNuke.Common.Globals.NavigateURL() WAS going back to the "EDIT" screen (which in this case is the default screen); once I realized that, it was interesting also to realize that I needed to fill it with both the "mid" and (also) the "tid" for it to work...

QUESTION:  I'm about to submit this for review; does everything need to be PERFECT in it ???  Example:  I see some fields that I'm not sure are being updated consistently or as intended (for instance, the "Actual Completion Date" field on the EDIT module apparently loses its value when it's surfaced for re-editing).

I've seen the "No Longer A Beginner" award given; I'm hoping this is what I get.

Please let me know if everything has to be PERFECT, William, and THANKS for your help !!!

Jeff 

 

 
New Post
1/5/2013 9:02 PM
 

Congratulations on successfully working through all those issues. I'm sure you learned more that way than if you had had no bugs to work through.

I thought that the lack of the ContentItemId not being correctly updated in the Tasks table had to be in the stored procedure but without seeing your code could not know for sure.

Regarding failure to redirect to the edit control upon clicking a task's edit icon, note that the View.ascx.cs file downloaded from the CodePlex project uses (in the rptTaskListOnItemCommand method) calls EditUrl NOT NavigateUrl. One of the primary differences between the two methods is that EditUrl adds the "mid" query string parameter automatically while with NavigateUrl you would have to add it as an additional parameter.

As for submitting the module for review - I'm not sure what you are referring to as I have not watched the video series. Since no code is completely "perfect", bug free, and follow every modern design pattern I'd go ahead  and submit as is - then, move on to either adding additional functionality to the TaskManager project or start work on something more advanced that makes use of newer design patterns.- particularly more of the client-side technologies as seen in DNN 6.2+ and 7. For example I'm working now to rewrite one of my more complex Forge projects (ePrayer) using Web Services and Knockout JS. Difficult at first with lots of debugging sessions wondering why it's not working, but rewarding when the mental breakthrough to new technologies finally happens.


Bill, WESNet Designs
Team Lead - DotNetNuke Gallery Module Project (Not Actively Being Developed)
Extensions Forge Projects . . .
Current: UserExport, ContentDeJour, ePrayer, DNN NewsTicker, By Invitation
Coming Soon: FRBO-For Rent By Owner
 
New Post
1/5/2013 10:10 PM
 

Hey, Bill...

1.  Regarding EDITURL vs NAViGATEURL : THANKS for the info about EDITURL.   Inferring from a TON of Internet messages I came across in searching the issue out, it looks like EDITURL simply doesn't work in the newer (6.+) versions of DNN.   Everybody I came across complained that it didn't work and had to devise workarounds (which is how I came across the method to use NAVIGATEURL).   Perhaps something to look into ???

2.  Not sure what I will do next.   I wish I had a more structured goal to shoot for (like the 25 lessons in the TASKMGR series), because I work better in that situation.   I work better with a solid goal to shoot for.

3.  I will simply submit the completed materials as-is.

4.  I know I couldn't have done this without your help.  THANK YOU, BILL.

Jeff

 

 

 
Previous
 
Next
HomeHomeGetting StartedGetting StartedNew to DNN Plat...New to DNN Plat...VIEW.ASCX Not DisplayingVIEW.ASCX Not Displaying


These Forums are dedicated to discussion of DNN Platform and Evoq Solutions.

For the benefit of the community and to protect the integrity of the ecosystem, please observe the following posting guidelines:

  1. No Advertising. This includes promotion of commercial and non-commercial products or services which are not directly related to DNN.
  2. No vendor trolling / poaching. If someone posts about a vendor issue, allow the vendor or other customers to respond. Any post that looks like trolling / poaching will be removed.
  3. Discussion or promotion of DNN Platform product releases under a different brand name are strictly prohibited.
  4. No Flaming or Trolling.
  5. No Profanity, Racism, or Prejudice.
  6. Site Moderators have the final word on approving / removing a thread or post or comment.
  7. English language posting only, please.
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out