Jump to content

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


Bill in Kansas City

Recommended Posts

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???

Link to comment
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.

Link to comment
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.

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...