So, I read up a bit more with the help of @ctgraham and it seems that I missed out on other similar functions for PublishedArticle like getAuthorString().
I was able to obtain the data set I needed using: $articles[$resultRow['submission_id']]['articleAuthors'] = $article->getAuthorString();
Dear @ajnyga
We want to add published date and author information on the plugin. We tried adding this <div class="date_published"><span class="fa fa-calendar"></span>{$article->getDatePublished()|date_format:"%Y-%m-%d"}</div>but did work. Some sidebar got lost
PHP Fatal error: Call to a member function getDatePublished() on array in /home/k2542002/public_html/cache/t_compile/426c7901dcce1f7ee6c5842275c71ac3c37e88d9^%%E7^E75^E7569244%%mostRead%3Ablock.tpl.php on line 20
I tried adding this $articles[$resultRow['submission_id']]['DatePublished'] = $article->getDatePublished(); to line 95 and. <div class="date_published"><span class="fa fa-calendar"></span>{$article->getDatePublished()|date_format:"%Y-%m-%d"}</div>to the block.tpl
The sidebar got lost all.
This is what I understand to your hint. Sorry, I am a newbie in coding
It is weird, I cannot get back my sidebar, even I deleted the plugin. And I could not access the Administration as admin and could not change theme. I save default theme but turn back to the current theme https://jurnalbeta.ac.id
I would try clearing the OJS cache, *.php from cache and cache/t_compile. And if you just deleted the plugin from plugins/block/ by deleting the folder, then it is probably a good idea to upload it again using the unmodified original version.
I tried deleting all .php file but the site went blank at all. I also tried changing with new ojs files, it got blank as well. So, I turn back to the old ojs files. Sidebar and footer are still missing
I tried set config.inc.php to off, I got the following errors
**Warning** : file_put_contents(/home/k2542002/public_html/cache/fc-locale-8c15ce7dfec31e437114d80f1f936272.php): failed to open stream: Permission denied in **/home/k2542002/public_html/lib/pkp/classes/cache/FileCache.inc.php** on line **90**
**Deprecated** : Non-static method Application::getName() should not be called statically, assuming $this from incompatible context in **/home/k2542002/public_html/lib/pkp/classes/install/form/InstallForm.inc.php** on line **149**
**Deprecated** : Non-static method Application::getName() should not be called statically, assuming $this from incompatible context in **/home/k2542002/public_html/lib/pkp/classes/install/form/InstallForm.inc.php** on line **151**
**Deprecated** : Non-static method Application::getName() should not be called statically, assuming $this from incompatible context in **/home/k2542002/public_html/lib/pkp/classes/install/form/InstallForm.inc.php** on line **153**
**Deprecated** : Non-static method VersionCheck::getCurrentCodeVersion() should not be called statically, assuming $this from incompatible context in **/home/k2542002/public_html/lib/pkp/classes/install/form/MaintenanceForm.inc.php** on line **37**
**Deprecated** : Non-static method PKPRequest::getUserVar() should not be called statically, assuming $this from incompatible context in **/home/k2542002/public_html/lib/pkp/classes/form/Form.inc.php** on line **369**
**Deprecated** : Non-static method PKPRequest::_checkThis() should not be called statically, assuming $this from incompatible context in **/home/k2542002/public_html/lib/pkp/classes/core/PKPRequest.inc.php** on line **592**
**Warning** : Cannot modify header information - headers already sent by (output started at /home/k2542002/public_html/lib/pkp/classes/cache/FileCache.inc.php:90) in **/home/k2542002/public_html/lib/pkp/classes/template/PKPTemplateManager.inc.php** on line **867**
**Warning** : Cannot modify header information - headers already sent by (output started at /home/k2542002/public_html/lib/pkp/classes/cache/FileCache.inc.php:90) in **/home/k2542002/public_html/lib/pkp/classes/template/PKPTemplateManager.inc.php** on line **868**
**Fatal error** : Smarty error: unable to write to $compile_dir '/home/k2542002/public_html/cache/t_compile'. Be sure $compile_dir is writable by the web server user. in **/home/k2542002/public_html/lib/pkp/lib/vendor/smarty/smarty/libs/Smarty.class.php** on line **1094**
Dear @ajnyga
We have restored the backup ojs file. The web is back to normal. I wonder, how could the trial of customizing plugin codes affect the other elements of OJS as we have experienced?
For me it sounds like your cache folder was not writable “Fatal error : Smarty error: unable to write to $compile_dir”. Restoring a backup also restored the folder permissions.
Editing a plugin code does not affect folder permissions so I am not sure what has happened.
But when you experimented with the plugin and added a call to an object it created an error and the rest of the sidebar disappeared. Removing the block would had solved this together with emptying the cache, but the new cache file’s could ne be written so you ended up with a blank page.
I usually test changes to plugins using a local test installation. OJS is very easy to install using for example XAMP.