Article display page behaving differently

Hi, @hannanhazari

These errors:
Line 278199: [25-Apr-2017 04:45:59 America/New_York] PHP Fatal error: Call to a member function getId() on null in /home/qamevedq/amphysiol.com/pages/article/ArticleHandler.inc.php on line 76

Are created probably because there was some content on the page, possibly images, that had a url like this: <img src="image1.jpg" />. Did you have something like that in your XML file?

What happens is that the image then gets an url like this, because it has no other base path http://amphysiol.com/index.php/amp/article/view/image1.jpg and when the browser tries to show that image the ArticleHandler.inc.php is called.

The handler then encounters the error here, because it tries to handle the image call like a article call which is of course not possible: https://github.com/pkp/ojs/blob/master/pages/article/ArticleHandler.inc.php#L76

@asmecher, I hope you followed. Should this be fixed in the handler? I can of course make sure that the in the case of embedGalley the images with no path always get some path and of course the editors should make sure that all the images are visible in any case, but I think that this scenario could cause errors in some other cases as well?

2 Likes