Jump to content

cleanboy3000

Members
  • Posts

    12
  • Joined

  • Last visited

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

cleanboy3000's Achievements

Jr. Member

Jr. Member (3/6)

0

Reputation

  1. Well thats the wierd thing...it is working everywhere else it is online. (on a staging site) That being said...caching is disabled on that staging site so ill try disable caching and test again.
  2. Yes...the standard template caching that comes with processwire. If you are looking for the form on the live site and thats why you are asking, as it is a live site I have replaced the button with a link that does work for now.
  3. ProcessWire 3.0.62 and its PHP 7.3 The odd thing though is that the form submission works when Tracy Debugger is active but then breaks when it is not active...which makes me think its not anything to do with PHP version. Can we learn anything from this? Tracy Debugger must implement something that fixes what I am looking to fix but I have no idea what that is or how to find that out ?
  4. Hey, thanks for this...managed to get tracy debugger installed. The really annoying thing about this is that once I install it and activate it and try the form submission...it works. Log out and try again and it fails...super annoying. There is an error that keeps cropping up though: info 2019‑09‑23 18:00:36 https://advancedmaterialsshow.com/ Warning: count(): Parameter must be an array or an object that implements Countable in /path/to/processwire/wire/core/PageArray.php:631 Not really sure if this has anything to do with it or if its anything I can do anything about as it seems to be something to do with the core?
  5. So I had an issue and elsewhere on the forum it was recommended I installed tracy debugger to debug the issue but now I cant log in. I get to the point where it asks me for username and password but then after giving that and clicking log in the browser kind of freaks out a bit and then just stops at an error: This page isn’t working advancedmaterialsshow.com redirected you too many times. Try clearing your cookies. ERR_TOO_MANY_REDIRECTS I have tried clearing cookies. Not really sure how to get in now or disable tracy debugger.
  6. I thought it always shows a bar at the top? I havent actually properly used it...I'll check it out...
  7. No, it works on the staging site for everyone that has tried it but on the live site it doesnt work, this is the real issue. I gave the staging site just to show the whole thing in action but removed it from the live site because, well, its a live site. This also rules out tracydebugger unfortunately... I have checked the logs in processwire and nothing comes up.
  8. So I have a very simple form with just 2 fields that submits on the staging site, tested and got my clients to test and everything was fine. Uploaded exactly the same code to the live site and it works for me but my clients just get the same empty form after submitting instead of the intended thank you message that should be showing in its place...there are no error messages and I can't seem to replicate this anywhere other than on the live site and i don't want to turn debugging mode on there. I have also checked the host for error logs but unfortunately the host doesn't seem to have this feature. How do I debug this or any information as to why it wouldn't be working would be super helpful. I have gotten clients to hard refresh and clear browser cache. They have tried on multiple machines and in different places with the same result. If you would like to take a look the staging site is here: http://ams.staging.gooi.ltd/ It's the Newsletter Sign Up button in the top left. This has been working for everyone that has tried though....like I said...only seems to not work on the live site for some people. This is the form code: <?php $out = ""; $out .= '<h2 class="text-white text-center pusher">SIGN UP FOR THE LATEST NEWS</h2>'; $out .= '<p class="text-white text-italics nomargin">Enter your name and email below:</p>'; // create a new form field (also field wrapper) $sform = $modules->get("InputfieldForm"); $sform->action = "./?modal=newsletter-signup"; $sform->method = "post"; $sform->attr("id+name",'newsletter-signup'); $field = $modules->get("InputfieldText"); $field->skipLabel = true; $field->attr('id+name','newsletter_name'); $field->attr('placeholder','Name'); $field->required = 1; $sform->append($field); // append the field // create email field $field = $modules->get("InputfieldEmail"); $field->skipLabel = true; $field->attr('id+name','newsletter_email'); $field->attr('placeholder','Email'); $field->required = 1; $sform->append($field); // append the field // oh a submit button! $submit = $modules->get("InputfieldSubmit"); $submit->attr("value","Submit"); $submit->attr("class","cta blue pusher"); $submit->attr("id+name","newsletter_submit"); $sform->append($submit); //$out .= $sform->render(); // form was submitted so we process the form if($input->post->newsletter_submit) { // user submitted the form, process it and check for errors $sform->processInput($input->post); if($sform->getErrors()) { // the form is processed and populated // but contains errors $out = $sform->render(); echo $out; } else { $name = $sanitizer->entities($input->post->newsletter_name); $email = $sanitizer->email($sform->get("newsletter_email")->value); $name = explode(' ', $name); $lastName = end($name); unset($name[count($name)-1]); $firstName = join(' ', $name); $mc = $modules->get("SubscribeToMailchimp"); $mc->subscribe($email, ['FNAME' => $firstName, 'LNAME' => $lastName]); $out = "<p class='text-white text-center pusher'>Thank you for signing up to receive the latest news on The Advanced Materials Show.</p>"; echo $out; } } else { // render out form without processing $out .= $sform->render(); echo $out; } ?>
  9. So I'm resurrecting this thread from the dead but are there any new ways to do this? The two modules listed are no help...the first just wont install as I'm using processwire 3 (I get the error that dependencies are not met) and the second doesnt seem relevant at all? I just need to be able to set a date and publish on that date as OP said. Thanks
  10. Hi there, Firstly my apologies if this has already been asked but I have searched both Google and these forums for an answer and haven't found something that matches exactly. I am building a site for a client and I would like them to be able to add and edit things without having to touch code at all...even if its having to go in and modify the html within ckeditor. I am currently adding in content to the site...just copying and pasting from a Libreoffice document, using the paste from word feature in ckeditor but it seems to add inline styles very frustratingly: <p style="margin-bottom:0cm"><span style="line-height:100%">Industry sectors represented at the show will include:</span></p> <p style="margin-bottom:0cm">&nbsp;</p> <p style="margin-bottom:0cm"><span style="line-height:100%">Automotive, Aerospace, Construction, Marine, Energy, Electronics, Medical, Sports Equipment and Defence.</span></p> <p style="margin-bottom:0cm">&nbsp;</p> <p style="margin-bottom:0cm"><span style="line-height:100%">Attendee job titles will include:</span></p> <p style="margin-bottom: 0cm; line-height: 100%">&nbsp;</p> <table border="1" cellpadding="1" cellspacing="1" class="table table-content" style="width:100%;"> <thead> <tr> <th scope="col"> <p style="margin-bottom: 0cm; text-align: left;"><span style="line-height:100%"><font color="#000000"><font face="Calibri, serif">Application Development Engineer</font></font></span></p> </th> <th scope="col"> <p style="margin-bottom: 0cm; text-align: left;"><span style="line-height:100%"><font color="#000000"><font face="Calibri, serif">Materials Buyer</font></font></span></p> </th> <th scope="col"> <p style="margin-bottom: 0cm; text-align: left;"><span style="line-height:100%"><font color="#000000"><font face="Calibri, serif">Process Engineer</font></font></span></p> </th> </tr> </thead> <tbody> <tr> <td> <p style="margin-bottom:0cm"><span style="line-height:100%"><font color="#000000"><font face="Calibri, serif">Chief Executive Officer (CEO)</font></font></span></p> </td> <td> <p style="margin-bottom:0cm"><span style="line-height:100%"><font color="#000000"><font face="Calibri, serif">Materials Coordinator</font></font></span></p> </td> <td> <p style="margin-bottom:0cm"><span style="line-height:100%"><font color="#000000"><font face="Calibri, serif">Procurement</font></font></span></p> </td> </tr> Above is a sample of what ckeditor generates from me pasting. I dont want any inline styles. I dont want it to create spans with inline styles. Within the table it is adding font elements...I do not want these. I thought I have the settings within processwire set up correctly but apparently I do not. (See attached for my settings for this field). Any help would be greatly appreciated! Cleanboy
  11. This is everything wrong with programming help forums.... https://xkcd.com/979/
×
×
  • Create New...