Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

JuanDBB's avatar

Spark::identifyTeamsByPath() generates 404s in settings

Hello,

I have set Spark::identifyTeamsByPath(); but it seems that in settings everything is hardcoded with team.id so many options stop working, generating 404s.

Is changing all code affected the only way to go?

Thank you in advance

0 likes
3 replies
Cronix's avatar
Cronix
Best Answer
Level 67

What version of Spark? It works fine in Spark v5 and below. I haven't used v6, so not sure about that version.

JuanDBB's avatar

@Cronix I think I found the reason. I have in Team model this:

/**
 * Use the database column slug other than id when retrieving a given model class
 *
 * @return string
 */
public function getRouteKeyName() {

    return 'slug';

}

Using that is when in settings everything related with Teams breaks.

Please or to participate in this conversation.