I think that the ".Hidden" class in Hidden Text is interfering with Vanilla's "li.Hidden". Whenever I set the permission for Hidden Text on a role, that role can't view deleted comments (verified that the comment is present in the source, but not visible).
Cheers Wanderer, I was having write permission problems but they're fixed now, and the config file looks just fine anyway, it's odd.
For now I've commented out the error message code, not the most ideal of solutions but it's working fine for now!
I'm not seeing this hidden text configuration panel. Currently no hidden text is working on my site. And for the posts that used the old hidden extension, they now no longer have an option to unhide...
EDIT: Sorry need to read the readme file closer.
New question:
I've been finding my Database.php file is getting wiped out, and replaced with just ?> . After fixing it today, I changed the permissions of it from 777 to 755. Now hidden comments is giving me a configuration error/warning on my form saying changes can't be saved.
Why does hidden text care about the permissions of my database.php?
Update:
So I set the permissions of my database.php file to 755, and my users started getting this error when they tried to login:
Notice: Undefined variable: NoticeCollector in
/****/forums/extensions/HiddenText/default.php on line 43
Fatal error: Call to a member function AddNotice() on a non-object in /*****l/forums/extensions/HiddenText/default.php on line 43
Line 43 is:
$NoticeCollector->AddNotice($Context->GetDefinition('ErrCreateConfig'));
Users at the forum I operate are asking if there is any chance of getting multiple hidden texts in the same comment to work. Any word on this?
Wow I feel like I've been flooding this discussion with comments today.
Okay... so I made the following changes to the default.php :
if (!AppendToConfigurationFile($Configuration['APPLICATION_PATH'].'conf/database.php', '')) $Errors = 1;
TO:
if (!AppendToConfigurationFile($Configuration['APPLICATION_PATH'].'conf/settings.php', '')) $Errors = 1;
As, you need to test if the settings.php is writable, as this is where the configurations go. Doing this lets me change the database.php permissions to 455 (from 777). Users are able to login, and no error message about not being able to write to the database.php
Hmm, not exactly sure to be honest... I haven't played with Vanilla in ages, don't know exactly where to dig. I think it has something to do with the way it handles error messages. I messed with it a little bit and it appears to rewrite the database.php file every time. If I toss in some text after the ?> it adds another ?> after what I've added.
(Anyone else have any thoughts?)
I can remake the same error you get by doing the same thing. Although no one else has had the same issue (or have not mentioned it). What other extensions do you have running?
As for multiple hidden texts in the same comment - no, not with this extension. We have gone over that a few times before (a popular request), and that would take some extra work with JS, which is over my head. Someone else would have to take over from here.
Update: Nice, we posted at the same time.... I'll check that out, and update the extension.
My update ended up blanking out my settings.php
Other extensions I have running:
ModTools
Poll
ForcedBBCode
Statistics
WhosOnline
NewDiscussions
Notify
MyGamerCard
ApplicantEmailVerification
PreviewPost
Vanillacons
Signatures
ReportPost
Audioscrobbler
MyComicVine
CAPTCHA
GuestWelcome
AjaxQuote
CategoryJumper
PrivateMessages
Nugget
DiscussionFilters
ParticipatedThreads
SpellChecker
UserFilters
CategoryRoles
AccountPictures
ChatStatus
PredefinedAttributes
Maybe its something with the changes in van 1.14?
I'm going to comment out the whole Writable check line for the time being.
@Comment 27~30, 33 Now it wipes out the Settings.php, and replaced with just ?> sometimes. (It make my forum redirect to setup/index.php today.)
I think the codes in default.php: if (!AppendToConfigurationFile($Configuration['APPLICATION_PATH'].'conf/database.php', '')) $Errors = 1;
if (!array_key_exists('HIDDEN_TEXT_SETUP', $Configuration)) {
AddConfigurationSetting($Context, 'HIDDEN_TEXT_MARKER', '(Hidden)');
AddConfigurationSetting($Context, 'HIDDEN_TEXT_VERSION', '1.4');
AddConfigurationSetting($Context, 'HIDDEN_TEXT_SETUP', 1);
} elseif($Errors == 1) {
// Could not save configuration
$NoticeCollector->AddNotice($Context->GetDefinition('ErrCreateConfig'));
} have to change with if (!array_key_exists('HIDDEN_TEXT_SETUP', $Configuration)) {
if (!AppendToConfigurationFile($Configuration['APPLICATION_PATH'].'conf/settings.php', '')) $Errors = 1;
if ($Errors = 0){
AddConfigurationSetting($Context, 'HIDDEN_TEXT_MARKER', '(Hidden)');
AddConfigurationSetting($Context, 'HIDDEN_TEXT_VERSION', '1.5');
AddConfigurationSetting($Context, 'HIDDEN_TEXT_SETUP', 1);
}elseif($Errors == 1) {
// Could not save configuration
$NoticeCollector->AddNotice($Context->GetDefinition('ErrCreateConfig'));
}
}
Made a small change from Dinoboffs suggestion, and it seems to have worked. I have tried it on my local install and the bug is gone. I tried settings.php and database.php as read-only and no error (like there was before). It appears to no longer be rewriting either file.
If someone that had this problem can give it a shot and let me know if it solved your issue. Please backup both settings/database.php just to be safe.
It is the original code in version 1.4 with lines 35 and 39 commented out. 35 was the issue, 39 was just not needed. Line 35: if (!AppendToConfigurationFile($Configuration['APPLICATION_PATH'].'conf/settings.php', '')) $Errors = 1; Line 39: AddConfigurationSetting($Context, 'HIDDEN_TEXT_VERSION', '1.5');
While you're in there, would you be willing to change the .Hidden class in your stylesheet to be more specific to your extension (to fix the conflict with the vanilla stylesheet)? Something like .HiddenText or .HiddenText_Hidden would work. I only saw one line in default.php that would need to change.
Comments
I get the following error message for some reason:
Could not save Hidden Text marker settings to configuration file!
... yet the extension is working fine, odd eh? Anyway to get rid of it please?
Take a look at the config file, it might have become corrupt?
Now it wipes out the Settings.php, and replaced with just ?> sometimes. (It make my forum redirect to setup/index.php today.)
I think the codes in default.php:
if (!AppendToConfigurationFile($Configuration['APPLICATION_PATH'].'conf/database.php', '')) $Errors = 1; if (!array_key_exists('HIDDEN_TEXT_SETUP', $Configuration)) { AddConfigurationSetting($Context, 'HIDDEN_TEXT_MARKER', '(Hidden)'); AddConfigurationSetting($Context, 'HIDDEN_TEXT_VERSION', '1.4'); AddConfigurationSetting($Context, 'HIDDEN_TEXT_SETUP', 1); } elseif($Errors == 1) { // Could not save configuration $NoticeCollector->AddNotice($Context->GetDefinition('ErrCreateConfig')); }
have to change withif (!array_key_exists('HIDDEN_TEXT_SETUP', $Configuration)) { if (!AppendToConfigurationFile($Configuration['APPLICATION_PATH'].'conf/settings.php', '')) $Errors = 1; if ($Errors = 0){ AddConfigurationSetting($Context, 'HIDDEN_TEXT_MARKER', '(Hidden)'); AddConfigurationSetting($Context, 'HIDDEN_TEXT_VERSION', '1.5'); AddConfigurationSetting($Context, 'HIDDEN_TEXT_SETUP', 1); }elseif($Errors == 1) { // Could not save configuration $NoticeCollector->AddNotice($Context->GetDefinition('ErrCreateConfig')); } }
If someone that had this problem can give it a shot and let me know if it solved your issue. Please backup both settings/database.php just to be safe.
It is the original code in version 1.4 with lines 35 and 39 commented out. 35 was the issue, 39 was just not needed.
Line 35: if (!AppendToConfigurationFile($Configuration['APPLICATION_PATH'].'conf/settings.php', '')) $Errors = 1;
Line 39: AddConfigurationSetting($Context, 'HIDDEN_TEXT_VERSION', '1.5');
I changed it,
Line 173: class="Hidden"
toLine 173: class="HiddenText"
And the appropriate changes to style.css as well.
I didn't think that small change warranted a version change so it is still 1.6....