[OzzModz] Advanced Forms

[OzzModz] Advanced Forms [Paid] 2.2.3

No permission to buy ($30.00)
by "Xenforo Root Directory"
where is that?
From the info you posted earlier it would be your /public_html directory.

If you need help with XenForo functions (like how it install an add-on) that should be done in the XenForo help/support forum. Not in the add-on's thread. ;)
 
If you still get the error after you've uploaded all of the files to the correct place. I'm not sure what to tell you. If you've never installed the forms add-on before, the add-on ID would not exist in your database. I THINK because of where you uploaded the json file to, it may have thought you were trying to install XF itself and that threw the error.

EDIT: I just tested uploading the json file to the same folder you uploaded it to and that's exactly what happened. XF threw the error thinking it was installing itself again.

Bug report posted:
 
Last edited:
@Snog The add-on uploaded successfully and can I just say, It is fabulous. However, I'd love to know how to remove the "User name:<name>" and how I can show the header phrases in the report thread. Thanks!

Edit: disregard the question on the header. For some reason it did not show the first time around.
 
@Snog The add-on uploaded successfully and can I just say, It is fabulous. However, I'd love to know how to remove the "User name:<name>" and how I can show the header phrases in the report thread. Thanks!

Edit: disregard the question on the header. For some reason it did not show the first time around.
For the name, in the form Report type tab, make sure this isn't checked...

187945

So far as the header question type, it really shouldn't be displayed in the posted thread. It is only intended to be displayed on the form itself. If it is showing, then I'll need to find out why.
 
@Snog

So I think I have a bug, PC Sender Name will not resolve usernames with spaces in them and will trigger a backend error as below:

  • LogicException: Cannot save with validation errors. Use validate() to ensure there are no errors. (First error: You may not start a conversation with the following recipients: Nik.)
  • src/XF/Service/ValidateAndSavableTrait.php:34
  • Generated by: caddyboy
  • Nov 7, 2018 at 1:13 PM
Stack trace
#0 src/addons/Snog/Forms/Pub/Controller/Form.php(1148): XF\Service\Conversation\Creator->save()
#1 src/addons/Snog/Forms/Pub/Controller/Form.php(808): Snog\Forms\Pub\Controller\Form->sendPC('caddyboy - Spon...', 'User name:[/...', Object(ForumApps\API\XF\Entity\User), 'Nik,', true, false, '')
#2 src/XF/Mvc/Dispatcher.php(249): Snog\Forms\Pub\Controller\Form->actionSubmit(Object(XF\Mvc\ParameterBag))
#3 src/XF/Mvc/Dispatcher.php(88): XF\Mvc\Dispatcher->dispatchClass('Snog\\Forms:Form', 'Submit', 'json', Object(XF\Mvc\ParameterBag), 'snog_forms_navt...', Object(Snog\Forms\Pub\Controller\Form), NULL)
#4 src/XF/Mvc/Dispatcher.php(41): XF\Mvc\Dispatcher->dispatchLoop(Object(XF\Mvc\RouteMatch))
#5 src/XF/App.php(1931): XF\Mvc\Dispatcher->run()
#6 src/XF.php(329): XF\App->run()
#7 index.php(13): XF::runApp('XF\\Pub\\App')
#8 {main}

Yes, I have the same problem. Also I am getting more Server error log.

Code:
LogicException: Cannot save with validation errors. Use validate() to ensure there are no errors. (First error: Please enter a title with less than 30 characters.) src/XF/Service/ValidateAndSavableTrait.php:34

Generated by: Coder Nov 19, 2018 at 5:07 PM

Stack trace

#0 src/addons/Snog/Forms/Pub/Controller/Form.php(1283): XF\Service\Thread\Creator->save()
#1 src/XF.php(393): Snog\Forms\Pub\Controller\Form->Snog\Forms\Pub\Controller\{closure}()
#2 src/addons/Snog/Forms/Pub/Controller/Form.php(1322): XF::asVisitor(Object(xenMade\UASD\XF\Entity\User), Object(Closure))
#3 src/addons/Snog/Forms/Pub/Controller/Form.php(707): Snog\Forms\Pub\Controller\Form->createThread(Array)
#4 src/XF/Mvc/Dispatcher.php(249): Snog\Forms\Pub\Controller\Form->actionSubmit(Object(XF\Mvc\ParameterBag))
#5 src/XF/Mvc/Dispatcher.php(88): XF\Mvc\Dispatcher->dispatchClass('Snog\\Forms:Form', 'Submit', 'json', Object(XF\Mvc\ParameterBag), 'snog_forms_navt...', Object(Snog\Forms\Pub\Controller\Form), NULL)
#6 src/XF/Mvc/Dispatcher.php(41): XF\Mvc\Dispatcher->dispatchLoop(Object(XF\Mvc\RouteMatch))
#7 src/XF/App.php(1931): XF\Mvc\Dispatcher->run()
#8 src/XF.php(329): XF\App->run()
#9 index.php(13): XF::runApp('XF\\Pub\\App')
#10 {main}

Request state

array(4) {
  ["url"] => string(26) "/form/sample-form.1/submit"
  ["referrer"] => string(49) "/form/sample-form.1/select"
  ["_GET"] => array(0) {
  }
  ["_POST"] => array(7) {
    ["question"] => array(9) {
      [19] => string(4) "none"
      [21] => string(3) "how"
      [29] => string(1) "2"
      [25] => string(1) "1"
      [22] => string(1) "1"
      [27] => string(10) "2018-11-13"
      [24] => string(1) "1"
      [26] => array(3) {
        [0] => string(1) "1"
        [1] => string(1) "2"
        [2] => string(1) "3"
      }
      [23] => string(3) "Yes"
    }
    ["attachment_hash"] => string(32) "26063d29b5f7f0ac9d113e475e7a883e"
    ["attachment_hash_combined"] => string(81) "{"type":"post","context":{"node_id":8},"hash":"26063d29b5f7f0ac9d113e475e7a883e"}"
    ["_xfToken"] => string(8) "********"
    ["_xfRequestUri"] => string(26) "/form/sample-form.1/select"
    ["_xfWithData"] => string(1) "1"
    ["_xfResponseType"] => string(4) "json"
  }
}
 
I am also get Server error log from @XenConcept one other add-on. So why this error when member have Permissions Conversation to staff member.

188343

Also PC sender are Admin and not set post count Permissions.

188344

Code:
LogicException: Cannot save with validation errors. Use validate() to ensure there are no errors. (First error: You must have 100 posts to create conversations. Currently you have 17 posts.) src/XF/Service/ValidateAndSavableTrait.php:34

Generated by: Coder Nov 19, 2018 at 5:21 PM

Stack trace

#0 src/addons/Snog/Forms/Pub/Controller/Form.php(1148): XF\Service\Conversation\Creator->save()
#1 src/addons/Snog/Forms/Pub/Controller/Form.php(833): Snog\Forms\Pub\Controller\Form->sendPC('Sample Poll App...', 'Coder,\n\nThank y...', Object(XenConcept\AdvancedPermissions\XF\Entity\User), 'Coder', true, true)
#2 src/XF/Mvc/Dispatcher.php(249): Snog\Forms\Pub\Controller\Form->actionSubmit(Object(XF\Mvc\ParameterBag))
#3 src/XF/Mvc/Dispatcher.php(88): XF\Mvc\Dispatcher->dispatchClass('Snog\\Forms:Form', 'Submit', 'json', Object(XF\Mvc\ParameterBag), 'snog_forms_navt...', Object(Snog\Forms\Pub\Controller\Form), NULL)
#4 src/XF/Mvc/Dispatcher.php(41): XF\Mvc\Dispatcher->dispatchLoop(Object(XF\Mvc\RouteMatch))
#5 src/XF/App.php(1931): XF\Mvc\Dispatcher->run()
#6 src/XF.php(329): XF\App->run()
#7 index.php(13): XF::runApp('XF\\Pub\\App')
#8 {main}

Request state

array(4) {
  ["url"] => string(26) "/form/sample-form.1/submit"
  ["referrer"] => string(49) "/form/sample-form.1/select"
  ["_GET"] => array(0) {
  }
  ["_POST"] => array(5) {
    ["question"] => array(9) {
      [19] => string(50) "Sample single line text answer type default answer"
      [21] => string(3) "hiw"
      [29] => string(1) "2"
      [25] => string(1) "1"
      [22] => string(1) "1"
      [27] => string(10) "2018-11-21"
      [24] => string(1) "1"
      [26] => array(3) {
        [0] => string(1) "1"
        [1] => string(1) "2"
        [2] => string(1) "3"
      }
      [23] => string(3) "Yes"
    }
    ["_xfToken"] => string(8) "********"
    ["_xfRequestUri"] => string(26) "/form/sample-form.1/select"
    ["_xfWithData"] => string(1) "1"
    ["_xfResponseType"] => string(4) "json"
  }
}
 
For the same error as ichpen's check the PC sender's account and make sure it's "Valid". His problem was the PC sender was marked "Invalid (email bounced) and that was causing his problem. If the sender is a "bot" user, remove the email from that's user's account. A "bot" doesn't need to receive emails from the site.

The other errors are from other add-ons that are trying to enforce restrictions on automated PCs. Contact the authors of those add-ons to have them correct that. Restrictions should not be enforced on automated PCs.

The forms system uses the standard XenForo PC creator service as an automated PC (which among other things, turns off validation checks). Therefore the forms system doesn't have any idea what other add-ons expect. So, other add-ons need to abort their checks of automated PCs for them to work properly with other add-ons.

Form code that sets the PC as automated:
Code:
$creator->setIsAutomated();

XenForo code that turns off validation checks:
Code:
public function setIsAutomated()
{
    $this->setLogIp(false);
    $this->setAutoSpamCheck(false);
    $this->setPerformValidations(false);
}
 
Last edited:
Very strange thing when members new registration automated PC send aren't have any problems with Same PC sender.

OK I am asking to @XenConcept If he can give compatible update.
 
Very strange thing when members new registration automated PC send aren't have any problems with Same PC sender.
Most likely because that is being sent by a different user than the Form PC.

And your error is telling you exactly what the problem is:
First error: You must have 100 posts to create conversations.
 
Most likely because that is being sent by a different user than the Form PC.

But all are registered user group. So different user are not problem? Oh I think one are send PC automatically from Admin CP then your add-on will be be send from member action?

Also who are send this PC have fully permission. So why he get this sends limit error?
 
But all are registered user group. So different user are not problem? Oh I think one are send PC automatically from Admin CP then your add-on will be be send from member action?
The PC is sent by the "PC sender name" you have set in the form options. So the other add-on is enforcing it's restrictions on that user. Which is why I said the other add-on needs to abort checks on automated PCs.

So far as the other error...
First error: Please enter a title with less than 30 characters.

I have no idea what add-on is causing that error. But it should also be aborted.

The other option is to change the user group for the user you have in "PC sender name" so the other add-on's permissions are usable by the other add-ons. But the proper way would be for the other add-ons to abort their checks on automated PCs.
 
Last edited:
@Nirjonadda I'm communicating with XenConcept about the problem. It all stems from the fact he assumes the person sending a PC is the user visiting the site when in reality it's a different user (and can be for any automated PC from any add-on).
 
@Snog

So looks like almost all the Poll based PC jobs failed on me today (though one worked strangely for my admin user). I have a valid PC message for Approved and nothing in the denied PC message.

  • LogicException: Cannot save with validation errors. Use validate() to ensure there are no errors. (First error: Please enter a valid message.)
  • src/XF/Service/ValidateAndSavableTrait.php:34
  • Generated by: Unknown account
  • Nov 21, 2018 at 10:31 AM
Stack trace
#0 src/addons/Snog/Forms/Cron/Pollresults.php(197): XF\Service\Conversation\Creator->save()
#1 src/addons/Snog/Forms/Cron/Pollresults.php(117): Snog\Forms\Cron\Pollresults::sendPC('Congrats... You...', '', Object(ForumApps\API\XF\Entity\User), 'Nik', true, true)
#2 [internal function]: Snog\Forms\Cron\Pollresults::processResults(Object(XF\Entity\CronEntry))
#3 src/XF/Job/Cron.php(35): call_user_func(Array, Object(XF\Entity\CronEntry))
#4 src/XF/Job/Manager.php(241): XF\Job\Cron->run(7.9937059879303)
#5 src/XF/Job/Manager.php(187): XF\Job\Manager->runJobInternal(Array, 7.9937059879303)
#6 src/XF/Job/Manager.php(76): XF\Job\Manager->runJobEntry(Array, 7.9937059879303)
#7 job.php(14): XF\Job\Manager->runQueue(false, 8)
#8 {main}
Request state
array(4) {
["url"] => string(8) "/job.php"
["referrer"] => string(35) "https://mysite.com/"
["_GET"] => array(0) {
}
["_POST"] => array(0) {
}
}
 
Last edited:
@Snog

So looks like almost all the Poll based PC jobs failed on me today (though one worked strangely).

  • LogicException: Cannot save with validation errors. Use validate() to ensure there are no errors. (First error: Please enter a valid message.)
  • src/XF/Service/ValidateAndSavableTrait.php:34
  • Generated by: Unknown account
  • Nov 21, 2018 at 10:31 AM
Stack trace
#0 src/addons/Snog/Forms/Cron/Pollresults.php(197): XF\Service\Conversation\Creator->save()
#1 src/addons/Snog/Forms/Cron/Pollresults.php(117): Snog\Forms\Cron\Pollresults::sendPC('Congrats... You...', '', Object(ForumApps\API\XF\Entity\User), 'Nik', true, true)
#2 [internal function]: Snog\Forms\Cron\Pollresults::processResults(Object(XF\Entity\CronEntry))
#3 src/XF/Job/Cron.php(35): call_user_func(Array, Object(XF\Entity\CronEntry))
#4 src/XF/Job/Manager.php(241): XF\Job\Cron->run(7.9937059879303)
#5 src/XF/Job/Manager.php(187): XF\Job\Manager->runJobInternal(Array, 7.9937059879303)
#6 src/XF/Job/Manager.php(76): XF\Job\Manager->runJobEntry(Array, 7.9937059879303)
#7 job.php(14): XF\Job\Manager->runQueue(false, 8)
#8 {main}
Request state
array(4) {
["url"] => string(8) "/job.php"
["referrer"] => string(35) "https://mysite.com/"
["_GET"] => array(0) {
}
["_POST"] => array(0) {
}
}
Yes, this appears to be a bug. But, could you provide a screenshot of what you have entered for both the approved and denied text for the application? (Promotion options tab for the form)

If it's better for you, you can send me a PC with those screenshots.
 
Yes, this appears to be a bug. But, could you provide a screenshot of what you have entered for both the approved and denied text for the application? (Promotion options tab for the form)

If it's better for you, you can send me a PC with those screenshots.

Just messaged you with a screenshot.
 
Just messaged you with a screenshot.
Thanks, bug confirmed.

As I said in the PC, it will be fixed in the next release. Unfortuntely, that won't happen until XenForo 2.0.11 is released.

For those experiencing the same error, DO NOT send a "Denied" PC, leave the "Denied PC title" blank and copy the "Approved PC text" to the "Denied PC text" box. That will stop the error from happening and keep you running until the fix can be released.
 
Last edited:
Top Bottom