Skip to content

Bug with getting information about the context #15653

@Semdevmaster

Description

@Semdevmaster

Bug report

Summary

In templates or snippets
$modx->context->key;//works fine
$modx->context->rank;//works fine
$modx->context->name;//does not work (always empty string)
$modx->context->description;//does not work (always empty string)

Step to reproduce

create a snippet that returns data from the current context

Observed behavior

in all templates and snippets when requesting current context data, only key and rank available
Name and description are always empty, although filled in the admin panel
But
$res = $modx->getObject('modContext',['key'=>'web']); print_r($res->toArray());
Array ( [key] => web [name] => Москва [description] => Москва [rank] => 0 )
Works fine

Expected behavior

$modx->context->name;//should output the data from admin panel
$modx->context->description;//should output the data from admin panel

Related issue(s)/PR(s)

Environment

MODX 2.8.1

Metadata

Metadata

Assignees

No one assigned

    Labels

    featureRequest about implementing a brand new function or possibility.

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions