WBCE / WBCE_CMS

Core package of WBCE CMS. This package includes the core and the default addons. Visit https://wbce.org (DE) or https://wbce-cms.org (EN) to learn more or to join the WBCE CMS community.
https://wbce-cms.org
GNU General Public License v2.0
31 stars 22 forks source link

Menu Link: [wblink] not working #462

Closed instantflorian closed 4 years ago

instantflorian commented 4 years ago

When entering a wblink shortcut (eg [wblink2] ) in the menu link > external link field, the links is not generated. In former versions of WBCE this was possible and this feature should work again, since this was the best way to build a menu link to a specific manually added anchor (not: automatically generated section anchors) on the site. 2019-11-14_103152 2019-11-14_103142

WebDesignWorx commented 4 years ago

Hello Florian, the issue is with the conversion of [wblinkXX] entries only, or other entries as well?

instantflorian commented 4 years ago

Only with [wblinkXX]. The error appears only on websites without the line define('SM2_CORRECT_MENU_LINKS',true); in the config.php.

instantflorian commented 4 years ago

Fixed with 9bcd21754937fbbb3d0a359f34d2b68a100935b1

mrbaseman commented 4 years ago

@WebDesignWorx One thing which I didn't understand yet: why doesn't the Output Filter work in this case? Is the output of this code inserted too late? If so, we might have a more general problem with the order in which things are processed.

WebDesignWorx commented 4 years ago

@mrbaseman I think it's because nothing is being ouput in this case, so the outputfilter doesn't get hold of the [wblinkXX] token. If you would echo the variable just at the same line in the code, the ouputfilter would work just fine. I had a similar WTF moment with it until I realized.

Anyways, the code I implemented yesterday could be rewritten using preg_match/RegEx if you are so inclined.

Best regards, Christian

mrbaseman commented 4 years ago

Ah, yes, of course. It's just an output by the header() command which never passes any output filter.