I have some code in my theme plugin that looks for the most popular articles and stores their details in the cache, if not already cached, or retrieves from the cache if it is already cached.
The moment this information gets cached for the first time, everything works fine, but after 24 hours the URL addresses change from using the baseUrl to using the server IP address, breaking the links with a “net::ERR_CERT_COMMON_NAME_INVALID” error.
$popularArticles[$result['submission_id']]['thumbnail'] = $request->getBaseUrl() . '/' . $publicFileManager->getContextFilesPath($context->getId()).'/'.$publishedArticle->getLocalizedCoverImage();
After 24 hours the url changes to use the IP address instead of the canonical url of the journal. Very strange.
Does anyone have any ideas about this?
I am using OJS 184.108.40.206 currently.