Jump to content

Updating field values fails (MySQL related)


Oliver
 Share

Recommended Posts

Andrew, nope, those are just template settings that you can edit on template field. Nothing wrong with those.

If you remove those two fields you added from text-page, everything starts working?

Profile exporter is a module which wraps the site as a installable site profile. It is pretty handy on when you transfer site from local to web.

Link to comment
Share on other sites

OK, yes, that worked. So should I try to recreate those fields, or do I need to do anything else, concerning permissions?

Well I did have data in those fields...the weird thing was that those fields worked until I tried to put a bold on the text, or did a return for a new line. Then the page would not save and throw me to the 404.

Link to comment
Share on other sites

You can try that. But when you create new field, pw actually creates new table to your database. I think the problem is somewhere in mysql user permissions, not pw. Not sure though. The case is, that all your "old fields" that you created locally are working, but when you have created new fields on server, they have failed somehow.

Link to comment
Share on other sites

I'm not sure about that, but it is my best guess. You could compare that your mysql user has all the same rights on the server than it has on your localhost. I think that install script checks those, but since you skipped that it doesn't help us here.

What I would actually do is go back to your localhost, use Profile Exporter (https://github.com/ryancramerdesign/ProcessExportProfile) and try to install that profile to your server.

Other option is to try install just fresh default pw on your server first, install script might spot some problems. You can install multiple sites, since those doesn't need to be on webroot (pw runs nicely on subpage like www.domain.com/mysite/).

Link to comment
Share on other sites

Wasn't there a related issue where it turned out it had to do with some strange php security module, that wouldn't allow certain/multiple post vars. I'm not sure and couldn't find it.

There was! That is probably exactly same issue, since it was also about multiple textareas.

Link to comment
Share on other sites

Thanks for the link, and from what I read Ryan decided that the problem had to due with the hosts mod_security settings concerning the use of multiple form fields. And he suggests just using a single textarea with tinymce on a template.

by just limiting each template to having only a single TinyMCE field, and using Markdown for any other fields that need any kind of formatting (given that HTML won't be allowed except in POST field). But personally I would consider looking at alternate hosting providers

Ok, well that kinda sucks, and I can get around that. BUT what about the new repeating module that was introduced earlier this week? Does that mean you wouldn't be able to have multiple textareas with tinymce?

Link to comment
Share on other sites

Assuming this is a mod_security thing, which it sounds like, I would ask the hosting company how to disable it. If they can't or won't, that web host probably doesn't meet the minimum requirements to run anything but a very basic CMS. It would be a good reason to switch. That code that WillyC posted should disable mod security from the htaccess (even on a shared host, if supported), but I think the exact method of doing it depends somewhat on the apache/mod_security version. It's possible that such a method may work, but the one he posted might not be the right one in your case... still worth investigating further, just in case. But probably best to check with the web host to see what method they recommend.

Link to comment
Share on other sites

Thanks Ryan, I asked my host and they said they wouldn't allow it since I am on a shared host. Is this something that is pretty common to disable on other shared hosts? Just wondering if I should change hosts. Can anyone recommend a decent U.S. host? It seems everyone I try, there is a problem!

EDIT my host did resolve this by whitelisting just one of the rules for mod_security.

Link to comment
Share on other sites

That's great! Glad they got it resolved. It sounds like the company is a good one if they found a solution for you on this. But to answer your question about a good US host, stick with a VPS (or something like it) so that you don't have to play the shared host games like this. You want to have control over your hosting environment. I've found ProcessWire runs great on every shared host I've tried it with. But stepping outside just ProcessWire for the moment, if you need to handle real traffic or run something beyond static HTML files, shared hosts are painful. They work well enough to make you think it's a good deal, but if web development is your job, then using a shared host is like being a chef limited to a pocket knife. Everything takes longer and you regularly have to improvise. The only shared host I was ever really happy with was Pair Networks (http://pair.com), but that was years ago and I have no idea what they are like now. They don't do shared hosting, but ServInt (http://servint.net) is the only hosting company I would trust my clients to. And obviously, that's who hosts processwire.com too. If you can step up from shared hosting to go the VPS (or more) route, they are fantastic and their servers are well optimized for ProcessWire. There are other good ones too. I know Pete has also mentioned he's had a good experience with a company called StormOnDemand. I've also heard good things about KnownHost and PowerVPS in the past. If you need something dirt cheap, don't need to handle real traffic and don't mind all the throttling and crap, BlueHost and HostGator are not bad for the price (both use cPanel, which I like), but use them for stuff you don't care about too much.

Link to comment
Share on other sites

Thanks Ryan, that is just the advice I need for hosting. I've always used shared hosting since it is cheap, and I've never had a site that gets tons of hits to warrant anything bigger. It sounds like you can have a VPS that could host several of these small fry sites. I might consider moving to one...maybe KnownHost.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...