Troubleshoot QCDR PHP Tokens That Are Blank, Locked, or Showing Errors
PHP Tokens have three different-looking outcomes that require different diagnosis: a legitimate empty result, a plan-locked/unavailable PHP Token, or an execution failure. QCDR 1.1.05 deliberately keeps those states separate so troubleshooting does not mistake safe failure for valid output.
If the PHP Token Is Locked
PHP Tokens require a current Max/All Access Effective tier. A downgrade preserves the saved PHP code and Token configuration, but QCDR refuses to execute it until Max access is restored.
The Manage PHP Tokens Joomla action controls who may author/manage PHP Token code in Administrator. It is not a permission required of frontend visitors at execution time.
If the Placeholder or Original Rule Text Remains
With Hide PHP errors — Recommended, an exception, unsuppressed warning, invalid runtime result, or other execution failure is converted to QCDR's internal unresolved state. A standalone placeholder remains visible, while a Token-backed Rule preserves the original matched text.
This is fail-safe behavior, not a successful blank output.
If a Sanitized Error Is Visible
Show sanitized PHP errors — Advanced can display a bounded diagnostic at the Token location. QCDR strips filesystem paths and common secrets and does not append stack traces, PHP source, or temporary execution filenames.
Use Show only while testing. Return to Hide before normal production use because the diagnostic itself can be visible to visitors.
If the Output Is Genuinely Blank
A PHP Token is allowed to execute successfully and produce an empty string. That success is cached as a success in Once-per-page-request mode and is applied as empty output. Do not treat every blank result as an error; inspect the PHP logic and expected return/output first.
Check Execution Mode and Match Timing
- Once per page request — Recommended: PHP runs once and the captured raw output is reused for that request.
- Every occurrence — Advanced: PHP executes separately for each actual Token location or selected Rule match.
For Token-backed Rules, QCDR does not execute the PHP speculatively before it knows that an eligible Rule match exists. If the Rule never reaches a selected match, the PHP should not run merely because the Token is configured.
Retest Safely
Use a controlled frontend page and, when available, private Rule Preview. PHP Tokens are not sandboxed; diagnostic testing can still perform real database changes, API calls, mail sends, or other side effects contained in the code.
Community Discussion
Want to compare workflows, share practical tips, or discuss how you use this QCDR feature? Visit the QC Dynamic Replacer Community. For private support, bug reports, account-specific issues, or feature requests, use the QuantaCade support system.