When you say it is stripping the
[productpage] short code, what exactly is it doing? Omitting that entirely, showing that exact text, or something else?
If I had to hazard a guess (and without more details it really is just a guess) I would assume the issue to be with:
$content = apply_filters('the_content', $content); $content = str_replace(']]>', ']]>', $content);