Custom Form Mod

Started by live627, July 09, 2008, 10:24:44 PM

Previous topic - Next topic

Kindred

looks to me as if the mod was not fully installed
Сл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."

PANIC12

Quote from: Kindred on March 08, 2023, 09:02:19 AMlooks to me as if the mod was not fully installed

I resinstalled everything, and now that error is not showing in the log, but I still get the blank white page with a ton of other errors.

The callable CustomForm\Integration::autoload could not be called.

Kindred

Still not fully installed.  It would seem to be missing files
Сл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."

Mareid

#2063
I installed this mod (4.02) using the package manager about a month ago.  I started having (most likely unrelated) problems about a week ago, and one suggestion was it may have been mods. 

I uninstalled, all mods, using the package manager. Then I started getting 30 errors every single time I touched anything in the admin section.
I chased the errors down to this one mod, so I reinstalled it, hoping that would fix the problem. It did not.  While I'm no longer getting 30 errors, I am getting 2 errors every time I touch anything in the admin section. The errors are related to this mod only.

Just to be sure I uninstalled a second time, deleted the package, re downloaded the package, re-uploaded and reinstalled. Same...30 errors on uninstall, 2 errors after re-installing.

I am willing to uninstall it manually if I have to but I'm really frustrated.  I believe I did everything correctly; the mod was on the official site, says it's compatible with 2.1 (I'm running 2.13)

I've attached a screen shot of the errors I'm now getting. The shot is taken immediately after clearing the log completely.

PANIC12

I have the same error as well with every page refresh.

You cannot view this attachment.

Kindred

go to phpmyadmin
go to smf_settings (smf_ prefix = your prefix)
run this
SELECT * FROM `smf_settings` WHERE `variable` LIKE '%inte%'
Сл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."

Mareid

#2066
Nothing comes back. Assuming I am doing it correctly.  I also found the link to smf (my prefix)_settings, and looked through the list of settings line by line and nothing has "inte" in it as far as I can tell. 

I tried deleting it again with the package manager then searched for any files with the same file name as the mod files.  All seemed to be gone. Looks like there's something the mod changed in the default package.

Mareid

Found the problem.  Maintenance>Forum Manitenance>Integration Hooks
Thank you Aleksi!!

Aleksi "Lex" Kilpinen

Slava
Ukraini!
"Before you allow people access to your forum, especially in an administrative position, you must be aware that that person can seriously damage your forum. Therefore, you should only allow people that you trust, implicitly, to have such access." -Douglas

How you can help SMF

PANIC12

Quote from: Kindred on March 09, 2023, 09:17:09 AMgo to phpmyadmin
go to smf_settings (smf_ prefix = your prefix)
run this
SELECT * FROM `smf_settings` WHERE `variable` LIKE '%inte%'




like this?


PANIC12

Sorry for the double reply. I was able to stop the hook error message. But I am still getting an error when I go to create a field for a form. What file might be the cause of this error?

PANIC12

Hi, I reinstalled all the files and ensured everything was uploaded. I don't think any files were missed. I am still getting a blank white screen when i try to access this path:

/index.php?action=admin;area=modsettings;sa=customform;act=editfield;field_id=1
What file do I need to look at that might be causing this issue?

live627

blank screen... you running php 8?Any errors in the error log file?

PANIC12

Quote from: live627 on April 02, 2023, 08:09:13 PMblank screen... you running php 8?Any errors in the error log file?

Yes, version 8.0.28. And no, nothing shows in the error log.

live627

PHP logs its errors to a separate file

PANIC12

Ah okay. I enabled the php error display and got this message when trying to add a field:

Fatal error: Uncaught TypeError: preg_match(): Argument #2 ($subject) must be of type string, null given in /home2/tfcclanc/domains/tfc-clan.com/public_html/Sources/CustomForm/ManageCustomForm.php:520 Stack trace: #0 /home2/tfcclanc/domains/tfc-clan.com/public_html/Sources/CustomForm/ManageCustomForm.php(520): preg_match() #1 [internal function]: CustomForm\ManageCustomForm->editField() #2 /home2/tfcclanc/domains/tfc-clan.com/public_html/Sources/CustomForm/ManageCustomForm.php(66): call_user_func() #3 /home2/tfcclanc/domains/tfc-clan.com/public_html/Sources/CustomForm/ManageCustomForm.php(74): CustomForm\ManageCustomForm->__construct() #4 /home2/tfcclanc/domains/tfc-clan.com/public_html/Sources/Subs.php(6028): CustomForm\ManageCustomForm::create() #5 /home2/tfcclanc/domains/tfc-clan.com/public_html/Sources/ManageSettings.php(145): call_helper() #6 /home2/tfcclanc/domains/tfc-clan.com/public_html/Sources/Admin.php(500): ModifyModSettings() #7 /home2/tfcclanc/domains/tfc-clan.com/public_html/index.php(191): AdminMain() #8 {main} thrown in /home2/tfcclanc/domains/tfc-clan.com/public_html/Sources/CustomForm/ManageCustomForm.php on line 520

live627

That's a fatal error? Odd... I thought that it was supposed to only be a harmless deprecation notice. Anyway, the fix is simple

$invalid = preg_match('/[^a-zA-Z0-9\-_.]/', $data['title']);

Replace with

$invalid = preg_match('/[^a-zA-Z0-9\-_.]/', $data['title'] ?? '');

PANIC12

Done, now this is the error i get.

Fatal error: Uncaught TypeError: strtr(): Argument #1 ($string) must be of type string, null given in /home2/tfcclanc/domains/tfc-clan.com/public_html/Sources/CustomForm/ManageCustomForm.php:831 Stack trace: #0 /home2/tfcclanc/domains/tfc-clan.com/public_html/Sources/CustomForm/ManageCustomForm.php(831): strtr() #1 /home2/tfcclanc/domains/tfc-clan.com/public_html/Sources/Subs-List.php(132): CustomForm\ManageCustomForm->list_customform_fields() #2 /home2/tfcclanc/domains/tfc-clan.com/public_html/Sources/CustomForm/ManageCustomForm.php(309): createList() #3 [internal function]: CustomForm\ManageCustomForm->EditForm() #4 /home2/tfcclanc/domains/tfc-clan.com/public_html/Sources/CustomForm/ManageCustomForm.php(66): call_user_func() #5 /home2/tfcclanc/domains/tfc-clan.com/public_html/Sources/CustomForm/ManageCustomForm.php(74): CustomForm\ManageCustomForm->__construct() #6 /home2/tfcclanc/domains/tfc-clan.com/public_html/Sources/Subs.php(6028): CustomForm\ManageCustomForm::create() #7 /home2/tfcclanc/domains/tfc-clan.com/public_html/Sources/ManageSettings.php(145): call_helper() #8 /home2/tfcclanc/domains/tfc-clan.com/public_html/Sources/Admin.php(500): ModifyModSettings() #9 /home2/tfcclanc/domains/tfc-clan.com/public_html/index.php(191): AdminMain() #10 {main} thrown in /home2/tfcclanc/domains/tfc-clan.com/public_html/Sources/CustomForm/ManageCustomForm.php on line 831

live627

I looked into this a bit more and realized that fixing this would require database changes rather than playing whack-a-mole, chasing random bugs. I've released v4.0.3 to fix this.

Once the scheduled task to fetch admin info/simple machines files runs, a prompt will appear telling that a new version is available.


You cannot view this attachment.

You cannot view this attachment.

Updates can be applied without removing the existing version.

PANIC12

thank you @live627! Unfortunately I'm still getting an error. The page loads when I go to add a field, but I get this error when trying to save:

2: Undefined array key "field_text"
The database value you're trying to insert does not exist: text
Function: SaveField

Advertisement: