Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DBD::mysql::st execute failed: Column 'cleansweep_log_uri' cannot be null #1

Open
CNG opened this issue Apr 2, 2014 · 4 comments
Open

Comments

@CNG
Copy link

CNG commented Apr 2, 2014

Hi there,

I tried the MT5 branch of this plugin on a clone of movabletype.org installation, running MT6.0.3, and while the setup appeared to work fine, I get an error upon visiting a page that should return a 404:

Failed to execute INSERT INTO mt_cleansweep_log (cleansweep_log_all_time_occur, cleansweep_log_blog_id, cleansweep_log_created_by, cleansweep_log_created_on, cleansweep_log_full_uri, cleansweep_log_last_requested, cleansweep_log_mapping, cleansweep_log_modified_by, cleansweep_log_modified_on, cleansweep_log_occur, cleansweep_log_return_code, cleansweep_log_uri) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) with all_time_occur, blog_id, created_by, created_on, full_uri, last_requested, mapping, modified_by, modified_on, occur, return_code, uri: DBD::mysql::st execute failed: Column 'cleansweep_log_uri' cannot be null

Possibly of note, I had to modify the configuration for Apache from what CleanSweep suggested because I have mt.cgi accessibly only through a subdomain on my test setup:

<Location /documentation/>
  ErrorDocument 404 http://cgi.example.us/mt/mt.cgi?__mode=404&blog_id=16
</Location>

I should try on a fresh MT6 installation to isolate any issues specific to this install, but feel free to let me know if you think you know why this is happening. Thank you!

@CNG
Copy link
Author

CNG commented Apr 8, 2014

I tried fresh installations of MT6.0.2 and MT5.2.9, as well as MT4.381 with version 1.2.3 of this plugin, and I get the same DB error for all three.

@CNG
Copy link
Author

CNG commented Apr 8, 2014

After reviewing the code, I realized $ENV{'REQUEST_URI'} contained the MT page mt.cgi?__mode=404&blog_id=2 instead of the failed URL. This is because using a "remote" URL in the ErrorDocument Apache directive causes a redirect. Consequently, I don't think this plugin can be used on installations where MT is only accessible by a different domain without further Apache directives to rewrite a relative URL in the ErrorDocument directive.

@CNG
Copy link
Author

CNG commented Oct 25, 2015

I got almost the same error again, this time unrelated to the cause I mentioned last time. This time, I needed to change the http to https at https://github.com/endevver/mt-plugin-cleansweep/blob/master/plugins/CleanSweep/lib/CleanSweep/CMS.pm#L26

@CNG
Copy link
Author

CNG commented Oct 25, 2015

Which could perhaps be replaced with something like:

( $ENV{'HTTPS'} eq 'on' ? 'https://' : 'http://' )

I don't claim to have tested that though.

@CNG CNG mentioned this issue Oct 25, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant