Jump to content
Sign in to follow this  
Bill in Kansas City

Writing a plug-in for the Admin: unable to trace program flow

Recommended Posts

Posted (edited)

CubeCart 6

Debugging: on

Caching: off

Cloudflare cache: off

Browser cache: off

Web server: display all errors

Since the documentation for writing plug-ins in lacking for anything much beyond "hello world", I've resorted to brute force, line-by-line tracing. I'm working through the visitor stats sample plugin, I'm trying to trace program flow. In every PHP file in the plug-in, I've tried:

  • inserting an echo statement with the filename
  • using echo to insert a script tag to log the filename to the console
  • writing the filename to a log file in a writable folder
  • saving the filename to the $_SESSION

None of these efforts did ANYTHING. Just as a test, I inserted what I knew to be syntax errors, invalidated the class, tossed garbage in, NOTHING CHANGES. No logging is done, no errors thrown, the debug section shows no PHP errors, the admin error logs show nothing. I've made enough mischief till kill the cart a dozen times over, what's going on???

Edited by Bill in Kansas City
correcting spelling

Share this post


Link to post
Share on other sites

If this were me, I would question whether I was editing the correct installation.

Really!! I am, sometimes, that absent-minded -- having about 20 different installations going at the same time.

I would like to give you one of my tools. If interested, send me a PM with your email address.

Share this post


Link to post
Share on other sites
2 hours ago, bsmither said:

If this were me, I would question whether I was editing the correct installation.

Really!! I am, sometimes, that absent-minded -- having about 20 different installations going at the same time.

I would like to give you one of my tools. If interested, send me a PM with your email address.

There's only one installation. PM is coming.

Share this post


Link to post
Share on other sites

I'm on a sugar-high right now.

Be back in the morning!

Share this post


Link to post
Share on other sites

without making any changes, you can check your web server error log and also the CubeCart error log.  most of the time those will give you what you need. it's rate to need to modify the site itself to send output

Share this post


Link to post
Share on other sites
Posted (edited)

To be completely honest with all present, something I was doing was incorrect. With some help and inspiration from bsmithers I was able to get the log file created to trace program flow, even confirmed that the method I was using before would have worked. I don't know exactly what my mistake was, but it's all on me.

Can we just forget this thread ever happend? 🙂

p.s. Although I should have been able to create PHP errors and never did. I've still got no explanation for that.

Edited by Bill in Kansas City

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this  

×
×
  • Create New...