Be sure to checkout our newest add-on Speedy!

EE compatibility updates:

  • Publisher is EE5 compatible, but it does not currently support the Fluid field.

ExpressionEngine.com licenses:

  • If you purchased an add-on from expressionengine.com, be sure to visit boldminded.com/claim to add the license to your account here on boldminded.com.

Ticket: Speedy Warnings

Status Resolved
Add-on / Version Speedy 1.1.0
Severity
EE Version 5.3.0
Images

Ian

Feb 10, 2020

Speedy Warnings

Also getting this randomly:

Warning
Use of undefined constant BASE - assumed ‘BASE’ (this will throw an Error in a future version of PHP)
ee/legacy/core/URI.php, line 333

Severity: E_WARNING
Warning
Cannot modify header information - headers already sent by (output started at ee/legacy/core/Exceptions.php:120)
ee/legacy/libraries/Functions.php, line 393

Severity: E_WARNING

I see another user submitted something similar:
https://boldminded.com/support/ticket/2071

I also can’t add any ignore urls.

#1

BoldMinded (Brian)

Feb 10, 2020

Ian, thanks for making the ticket. I really need more information though. What type of caching are you using? Static or fragment? Can you provide some template code if fragment caching. What URL are you visiting when you get those warning messages?

#2

Ian

Feb 10, 2020

Redis Static caching. I sent a photo did you not get it?

#3

Ian

Feb 10, 2020

Are you unable to login?

#5

BoldMinded (Brian)

Feb 10, 2020

Photo uploads aren’t working, you can add a URL to a private message in the ticket though.

Even if you provide login info, it is not the first thing I do. I don’t just jump into people’s sites every time they submit a ticket and just try to fix something. You’re intimately familiar with the site, I am not. I’ve done that in the past and honestly half the time it turns out to not be a bug, but an configuration or template code issue or something.

Are you positive your htaccess rules are setup correctly and it is loading the index_redis_default_site.php file instead of your regular index.php file?

#6

Ian

Feb 10, 2020

Yes, and I also see now that doing that prevents freeform forms from submitting.

#7

BoldMinded (Brian)

Feb 10, 2020

Regarding the form submissions, it’s probably your CSRF token. https://docs.boldminded.com/speedy/docs/static-caching#csrf-tokens

#8

BoldMinded (Brian)

Feb 10, 2020

What is the URL in which the error you reported occurs? You provided the home page url, but I don’t see anything happening there.

#9

BoldMinded (Brian)

Feb 10, 2020

And what is the URL to the form page?

#10

Ian

Feb 10, 2020

/cp/addons/settings/speedy/driver_stats/

#11

BoldMinded (Brian)

Feb 10, 2020

So no errors on the front-end, just that driver stats page?

#12

Ian

Feb 10, 2020

Correct and the random error i posted is showing up on the back-end as well… randomly.

#13

Ian

Feb 10, 2020

regarding forms not submitting… i’ve excluded them from being cached and still having the issue.
i also see that the form generating the csrf token is not being updated by speedy.

#14

Ian

Feb 10, 2020

further… ignore_post_requests… seems to be bunk

also just got this again at this page:
/cp/members

Warning
Use of undefined constant BASE - assumed ‘BASE’ (this will throw an Error in a future version of PHP)
ee/legacy/core/URI.php, line 333

Severity: E_WARNING
Warning
Cannot modify header information - headers already sent by (output started at ee/legacy/core/Exceptions.php:120)
ee/legacy/libraries/Functions.php, line 393

Severity: E_WARNING

Errors and warnings and more errors after installing speedy :-(

#15

BoldMinded (Brian)

Feb 10, 2020

Just to confirm, in your config, it’s set to “speedy_ignore_post_requests” not “ignore_post_requests”?

#16

Ian

Feb 10, 2020

$config[‘speedy_driver’] = ‘redis’;
$config[‘speedy_static_enabled’] = ‘yes’;
$config[‘speedy_ignore_post_requests’] = “yes”;
$config[‘speedy_redis_settings’] = [
  ‘static’ => ‘yes’,
  ‘servers’ => [
      [
        ‘host’ => ‘127.0.0.1’,
        ‘port’ => ‘6379’,
        ‘timeout’ => ‘0’,
        ‘password’ => null,
      ]
  ],
  ‘ignore_urls’ => [
      [‘url’ => ‘review_network’],     
 
  ],
];

#17

BoldMinded (Brian)

Feb 10, 2020

I logged into your CP and it says the Static driver is unsupported. Did you recently disable it?

https://d.pr/i/veksjX

#18

Ian

Feb 10, 2020

refresh. should all be there except for memcache/d

#19

BoldMinded (Brian)

Feb 10, 2020

Comment has been marked private.

#20

BoldMinded (Brian)

Feb 10, 2020

You said “I also can’t add any ignore urls.” - were you trying to do this through the CP before adding it to your config.php file and it did not work?

#21

Ian

Feb 10, 2020

correct! yeah i see that it was only working in config.php

still getting those random errors:
$config[‘speedy_driver’] = ‘redis’;
$config[‘speedy_static_enabled’] = ‘yes’;
$config[‘speedy_ignore_post_requests’] = “yes”;
$config[‘speedy_redis_settings’] = [
  ‘static’ => ‘yes’,
  ‘servers’ => [
    [
      ‘host’ => ‘127.0.0.1’,
      ‘port’ => ‘6379’,
      ‘timeout’ => ‘0’,
      ‘password’ => null,
    ]
  ],
  ‘ignore_urls’ => [
    [‘url’ => ‘review_network’],   

  ],
];

and that page with the form will not submit (nor any currently) https://ee5.navitend.com/review_network.

#22

Ian

Feb 10, 2020

Sorry i meant this:

Warning
Use of undefined constant BASE - assumed ‘BASE’ (this will throw an Error in a future version of PHP)
ee/legacy/core/URI.php, line 333

Severity: E_WARNING
Warning
Cannot modify header information - headers already sent by (output started at ee/legacy/core/Exceptions.php:120)
ee/legacy/libraries/Functions.php, line 393

Severity: E_WARNING

#23

BoldMinded (Brian)

Feb 10, 2020

Lets stick to 1 issue at a time and focus on the random error, then we’ll look at the ignore url, and then the form posting.

The random error, it literally happens on any page in the control panel only, not just on Speedy’s settings pages, and not on the front-end?

#24

Ian

Feb 10, 2020

It now appears randomly on any control panel page, this only started happening after installing Speedy.
After Speedy I installed Char Limit add-on and got hit with the error. And after adding you as a member I got it and after refreshing the member page.

#25

BoldMinded (Brian)

Feb 10, 2020

What was your order number when you purchased Speedy?

#26

Ian

Feb 10, 2020

I understand it makes sense to work on issues in order 😊
I have another now on this page:

/cp/addons/settings/speedy/cache_clearing_settings/

Warning
count(): Parameter must be an array or an object that implements Countable
user/addons/speedy/mcp.speedy.php, line 1085

Severity: E_WARNING
Warning
Cannot modify header information - headers already sent by (output started at ee/legacy/core/Exceptions.php:120)
ee/legacy/core/Input.php, line 238

Severity: E_WARNING
Warning
Cannot modify header information - headers already sent by (output started at ee/legacy/core/Exceptions.php:120)
ee/legacy/libraries/Functions.php, line 393

Severity: E_WARNING

#27

Ian

Feb 10, 2020

Receipt from Packet Tide LLC  
Receipt #1492-8781  

#28

BoldMinded (Brian)

Feb 10, 2020

Also where did you get it from? EE Store or from boldminded.com? What I’m getting at is the license you entered is invalid, I don’t have any record of it. If you purchased from EE.com you need to claim the license. https://boldminded.com/claim.

It’s possible that Speedy is trying to do a license check and it is failing on a CP redirect and causing the error message.

#29

Ian

Feb 10, 2020

That claim form isn’t working.
When I submit I get this url: https://boldminded.com/claim?error=1 with no real error message.
When I look at licenses: https://boldminded.com/account/licenses, I have none.
Here is the license: [removed b/c this wasn’t a private comment]

#30

BoldMinded (Brian)

Feb 10, 2020

I fixed this error:

count(): Parameter must be an array or an object that implements Countable
user/addons/speedy/mcp.speedy.php, line 1085
#31

Ian

Feb 10, 2020

Awesome! Thanks so much for your help with this! 😊
Getting there!!

#32

BoldMinded (Brian)

Feb 10, 2020

Ok, try to do the claim thing again.

#33

Ian

Feb 10, 2020

Message now: Sweet! Your license is no attached to your boldminded.com account. 😊

Though this still lists no licenses… though not sure it does: https://boldminded.com/account/licenses

#34

Ian

Feb 10, 2020

Also in the vein of forms… the simple search form on every page is not getting a unique csrf value.

Thanks!

#35

BoldMinded (Brian)

Feb 10, 2020

You’ll need to test the CSRF stuff without Speedy installed/enabled, make sure it is present in the forms to begin with, then install/enable Speedy.

Also, please provide a URL to the pages that contain a form so I can take a look. It might be worth setting up a very basic test template with nothing but a form in it, no extra JS, CSS, or HTML, _just_ the necessary EE template code to render the form.

#36

Ian

Feb 10, 2020

I’ve tested the site and can confirm that the CSRF fields are fine and all the forms were working fine without speedy installed.
Every page has a search function at the top of the site.

https://ee5.navitend.com/review_network has a form
and this page too:
https://ee5.navitend.com/events/see-you-at-leadingage-nj-annual-meeting-expo-booth-161

Search and these other pages were thoroughly tested and working pre-Speedy.

I’ll create stripped down templates of these as well if that’s absolutely needed.

#37

BoldMinded (Brian)

Feb 10, 2020

I can’t stress enough how stripped down templates help. I wrote a whole article about it 😊 https://u.expressionengine.com/article/debugging-in-expressionengine

#38

Ian

Feb 10, 2020

Got it. Here are the plain forms:

https://ee5.navitend.com/review_network-plain
https://ee5.navitend.com/event_reg-plain/see-you-at-leadingage-nj-annual-meeting-expo-booth-161
https://ee5.navitend.com/search-plain

Search keeps on working which is nice.
The other 2, looks like it’s throwing a 404 on the POST… I’m not sure why :-(

#39

Ian

Feb 10, 2020

When I do this:

https://ee5.navitend.com/index_redis_navitend.php/review_network-plain

And submit I get a 403 response. :-( again not totally understanding why.

Seems like an htaccess / speedy / freeform confusion going on. Frustratingly simple search form continues working great. hmm

#40

Ian

Feb 11, 2020

Well good call on the giving a completely stripped down template a go… https://ee5.navitend.com/whatgives

The template has 2 lines:

{exp:speedy:static}
whatgives

Something from Speedy looks to be outputting:

int(0)
int(0)

why?

#41

BoldMinded (Brian)

Feb 11, 2020

Ok, I think the csrf tokens are working now. There was an issue with the regex. I also had to add the {exp:speedy:static} tag to your review_network-plain template to get it to cache. Test out that form now and see if it is posting correctly.

I also had to comment out your “review_network” rule in the ignore_urls config value to get this to work.

#42

BoldMinded (Brian)

Feb 11, 2020

Those int(0) values was me testing the regex.

#43

Ian

Feb 11, 2020

Ok I’m confused why the review_network had to be commented out.

The url is review_network-plain

The token looks to be updated but the form still will not submit. It looks to be getting a 404 response.
Is something hosed with my htaccess? Is there something not pointed right?

#44

Ian

Feb 11, 2020

If you are currently working on this, awesome.
I’m able to submit forms everywhere now!

#45

Ian

Feb 11, 2020

I think everything now is in order! Thanks so much for all your help with this. 😊
I’m going to mark this as resolved!

Login to reply

Contact

For add-on support, please use the Support section. General inquries and pre-sale questions can be sent to support@boldminded.com.