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

FIX getCachedMarkup returns NULL instead of string if file doesn't exist #561

Conversation

sabina-talipova
Copy link
Contributor

@sabina-talipova sabina-talipova commented Jul 7, 2023

Description

  • Check if file exist before return cached link for this file from getCachedMarkup method.
  • Method handle_shortcode should return string.

Test steps

  • Set FileShortcodeProvider::allow_session_grant = true;
  • Create new Page or open existing one in CMS;
  • Click Insert Link to a file in Content field;
  • Select any existing file and Save page;
  • Remove file from backend or change link in DB record;
  • Open Page in CMS again;
  • You should not see any Errors;
  • Shortcode link should lead to "Home" page;

Parent issue

@sabina-talipova sabina-talipova force-pushed the pulls/2.0/fix-cachemarkup-issue branch from 38ddd50 to 482ed49 Compare July 7, 2023 02:37
@GuySartorelli
Copy link
Member

GuySartorelli commented Jul 10, 2023

The bug was reported for CMS 4 - please retarget this PR to the 1.13 branch.

@sabina-talipova sabina-talipova deleted the pulls/2.0/fix-cachemarkup-issue branch July 11, 2023 00:39
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

Successfully merging this pull request may close these issues.

2 participants