Since Geeklog v2.0.0 the default article permissions and the Story Admin Group where not used for the default permissions when a submitted article was approved or brought up in the Article Editor. Instead the Topic Admin group and the default topic permissions for the article was used. This has now been fixed in Geeklog v2.2.1. but you must manually go through and check any previously submitted articles and update their permissions if needed.
(while not updating the owner_id) create a text file with the following name "fix-article-issue-967.php" in the public_html directory of your geeklog website. Add the code below to the file and save it.
Text Formatted Code
<?php
require_once 'lib-common.php';
global $_CONF, $_GROUPS, $_TABLES, $MESSAGE, $_USER;
// For Root users only
if (!SEC_inGroup('Root')) {
$display .= COM_showMessageText($MESSAGE[29], $MESSAGE[30]);
$display = COM_createHTMLDocument($display, array('pagetitle' => $MESSAGE[30]));
COM_errorLog("Someone has tried to access a custom Geeklog Database Upgrade Routine {$_SERVER["SCRIPT_NAME"]} without proper permissions. User id: {$_USER['uid']}, Username: {$_USER['username']}, IP: " . $_SERVER['REMOTE_ADDR'],1);
COM_output($display);
exit;
}
COM_errorLog("Someone has run a custom Geeklog Database Upgrade Routine {$_SERVER["SCRIPT_NAME"]} User id: {$_USER['uid']}, Username: {$_USER['username']}, IP: " . $_SERVER['REMOTE_ADDR'],1);
$display = '<h1>Custom Development Database Update</h1>';
$display .= '<p>Fix for Article Permissions and Issue #<a href="https://github.com/Geeklog-Core/geeklog/issues/967" target="_blank">967</a></p>';
$display .= "<p><strong>Starting Process</strong></p>";
$display .= "<p><em>WORKING</em></p>";
if (isset($_GROUPS['Story Admin'])) {
$group_id = $_GROUPS['Story Admin'];
} else {
$group_id = SEC_getFeatureGroup('story.edit');
}
$A = array();
SEC_setDefaultPermissions($A, $_CONF['default_permissions_story']);
DB_query("UPDATE {$_TABLES['stories']} SET group_id = '$group_id', perm_owner = '{$A['perm_owner']}', perm_group = '{$A['perm_group']}', perm_members = '{$A['perm_members']}', perm_anon = '{$A['perm_anon']}'");
COM_errorLog("Finished Upgrade Routine Successfully.");
$display .= "<p><strong>Finished Process</strong></p>";
CTL_clearCache();
$display .= '<p>The Geeklog Custom Development Database Update has completed.</p>
<p><em>Important:</em> Remember to delete the script file <code>' . $_SERVER["SCRIPT_NAME"] . '</code> once this process has run successfully.</p>
<p>Please visit the <a href="https://www.geeklog.net/forum/viewtopic.php?showtopic=97115" target="_blank">Geeklog Support Forums</a> if you have any questions or run into any problems.</p>';
$display = COM_createHTMLDocument($display, array('pagetitle' => $MESSAGE[40]));
COM_output($display);
Using your browser then visit the file to execute the code (you must be logged in as the Root user to run the code).
One of the Geeklog Core Developers.