News:

Want to get involved in developing SMF, then why not lend a hand on our github!

Main Menu

SA Knowledge Base

Started by SMFHacks.com Team, January 20, 2012, 06:14:12 PM

Previous topic - Next topic

Kindred

#340
Something very strange....



My system does not seem to have the permissions for "add KB article"
the only permission that allows someone to add an article seems to be "manage KB" (which is more permission than I want to give)


I must have screwed something up, somewhere....   ideas?


--edit -- never mind.   I realized that it was a per-category permission, not in the core permissions
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

vbgamer45

Glad you were able to figure it out! Permissions get tricky when there are multiple places in can be done.
Community Suite for SMF - Take your forum to the next level built for SMF, Gallery,Store,Classifieds,Downloads,more!

SMFHacks.com -  Paid Modifications for SMF

Mods:
EzPortal - Portal System for SMF
SMF Gallery Pro
SMF Store SMF Classifieds Ad Seller Pro

Kindred

BTW:

..../index.php?action=kb;area=article;cont=11
2: preg_match_all(): The /e modifier is no longer supported, use preg_replace_callback instead
File: /...../Sources/KB/KBSubs.php
Line: 91

getting bunches of these every so often.... (different line numbers too)

php 7.3
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

vbgamer45

Update!

2.2
!Fixed deprecated /e regex for highslide Fixes PHP 7.3+
+Updated highslide with MIT license version. Allows use on commercial sites now
Community Suite for SMF - Take your forum to the next level built for SMF, Gallery,Store,Classifieds,Downloads,more!

SMFHacks.com -  Paid Modifications for SMF

Mods:
EzPortal - Portal System for SMF
SMF Gallery Pro
SMF Store SMF Classifieds Ad Seller Pro

vbgamer45

Update!
2.3
!Removed create_function for better PHP 7.4+ support
Community Suite for SMF - Take your forum to the next level built for SMF, Gallery,Store,Classifieds,Downloads,more!

SMFHacks.com -  Paid Modifications for SMF

Mods:
EzPortal - Portal System for SMF
SMF Gallery Pro
SMF Store SMF Classifieds Ad Seller Pro

davo88

Will this mod work with 2.1?

shadav

Quote from: davo88 on April 29, 2022, 04:22:55 AMWill this mod work with 2.1?

if you check the mod's page
QuoteCOMPATIBLE WITH 2.0, 2.0.2, 2.0.3, 2.0.4, 2.0.5, 2.0.6, 2.0.7, 2.0.8, 2.0.9, 2.0.10, 2.0.11, 2.0.12, 2.0.13, 2.0.14, 2.0.15, 2.0.16, 2.0.17
there is your answer, so sorry no it will not

Kindred

Since this is mostly hooks, I tried on 2.1.4 but it failed. (php 8.0)


Fatal error: Uncaught TypeError: array_slice(): Argument #1 ($array) must be of type array, null given in /home/.../Sources/KB/KBHooks.php:179 Stack trace: #0 /home/.../Sources/KB/KBHooks.php(179): array_slice(NULL, 0, 0, true) #1 /home/.../Sources/Subs.php(5766): KB_menu_buttons(Array) #2 /home/.../Sources/Subs.php(5571): call_integration_hook('integrate_menu_...', Array) #3 /home/.../Sources/Subs.php(4357): setupMenuContext() #4 /home/t.../Sources/Subs.php(4514): setupThemeContext() #5 /home/.../Sources/Subs.php(4157): template_header() #6 /home/.../index.php(187): obExit(NULL, true, true) #7 {main} thrown in /home/.../Sources/KB/KBHooks.php on line 179


Also, fails on the second index.php edit
Code (find) Select
// Fall through to the board index then...
require_once($sourcedir . '/BoardIndex.php');
return 'BoardIndex';
Code (Add before) Select
if (!empty($modSettings['kb_knowledge_only']) && $modSettings['kb_enabled'])
{
require_once($sourcedir . '/KB/KBMain.php');
   return 'KB';
}


although, if you search for
// No default action huh? then go to our good old BoardIndex.
it should install into the correct place... but that does not fix the critical failure




further info in the errors in the error log, after removing the mod
triggered by any page hit... in this case, reloading the package list

index.php?action=admin;area=packages;sa=install2;package=SA_KB.zip;pid=0
KBHooks.php (Line 161) 2: Undefined array key "knowledgebase"
KBHooks.php (Line 174) 2: Undefined array key "profile"
KBHooks.php (Line 174) 2: Trying to access array offset on value of type null
KBHooks.php (Line 174) 2: foreach() argument must be of type array|object, null given
KBHooks.php (Line 179) 2: Undefined array key "profile"
KBHooks.php (Line 179) 2: Trying to access array offset on value of type null

The callable KB_ob could not be called.
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

Advertisement: