Edit Fieldata resets changes after setup

Edit Fieldata resets changes after setup, a forum discussion on Jojo CMS. Join us for more discussions on Edit Fieldata resets changes after setup on our Administration (backend and configuration) forum.

Back to Forum Index : Back to Administration (backend and configuration)   RSS

3 Feb 2010
Posts: 39

Hello Jojo Masters!

I'm trying to remove the "website" field from user registration and user profile (jojo_community)

I used the FLAG fields in the edit fielddata section (removed REGISTER,PROFILE) so that it wont show in those pages.

It worked fine.

The problem when I run setup, the FLAG field is refilled and the "website" field re-appears in register and user-profile page.

Did any of you notice this before?

Thank you in advance



3 Feb 2010
Posts: 379

Fielddata is autoupdated from the autoupdate files in the install folders (in all plugins/themes) when you run setup. This is how plugins get set up correctly when you install them, but also means that if the autoupdate file isn't changed, it will reset any changes you make when setup is run.
I'm guessing those fields are set in jojo_community/install/autoupdate_[something]
If you change that file it will maintain the settings at setup.

Core Developer


3 Feb 2010
Posts: 327

Create an autoupdate_user.php file in your theme. Add this code...

$table = 'user';
$field = 'us_website';
$default_fd[$table][$field]['fd_order'] = $o++;
$default_fd[$table][$field]['fd_type'] = 'url';
$default_fd[$table][$field]['fd_help'] = '';
$default_fd[$table][$field]['fd_flags'] = '';

Run setup.

This should prevent it from resetting. If it doesn't, add a SQL hack into setup.php in your theme...

Jojo::updateQuery("UPDATE {fielddata} SET fd_flags='' WHERE fd_table='user' AND fd_field='us_website' LIMIT 1");
Back to Forum Index : Back to Administration (backend and configuration)   RSS
You must be logged in to post a reply

You need to Register or Log In before posting on these forums.