Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Database no longer in debugging toolbar when using Propel on some upgrades #284

Open
jestep opened this issue Feb 17, 2023 · 4 comments
Open

Comments

@jestep
Copy link

jestep commented Feb 17, 2023

Is there something that changed that would remove the database debugging/icon from the web toolbar? I have a number of legacy sites that no longer have the database icon on the toolbar after updating to 1.5.15. I have 1 propel site that does have it still but I can't see anything different in the configuration files, nothing else changed on these sites. web_debug is set to true in settings.yml, DebugPDO is used in databases.yml, and the controller is set to load the debugging environment. Sites running doctrine are unaffected.

@connorhu
Copy link
Collaborator

If you mean the SQL queries icon, it works for me.
image

@jestep
Copy link
Author

jestep commented Feb 18, 2023

Sorry, yes sql queries. Screenshots are for different sites on the same server, the config on them is almost identical though.

X.13
1 5 13 Propel

X.15
1 5 15 Propel

@connorhu
Copy link
Collaborator

The icon will only appear if there are any Doctrine Events:
https://github.com/FriendsOfSymfony1/symfony1/blob/master/lib/plugins/sfDoctrinePlugin/lib/debug/sfWebDebugPanelDoctrine.class.php#L30-L33

I guess the listener of the profiler not registered. This is the callstack for a preConnect event:
image

This should return the symfony_profiler listener. If something is not set correctly you should get an error here.

    $dbm = sfContext::getInstance()->getDatabaseManager();
    $database = $dbm->getDatabase($dbm->getNames()[0]);
    $profilerListener = $database->getDoctrineConnection()->getListener()->get('symfony_profiler');

@mentalstring
Copy link
Contributor

I think I had the same issue in the past and solved it by disabling persistent db connections in dev.

    param:
      persistent:
        value:      false
      classname:    DebugPDO

According to Propel docs, persistent connections need to be disabled for correct query counting/logging.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants