Note to self: If it ain't broke don't fix it :)

Note to self: If it ain't broke don't fix it :)
    
I messed something up the other day and now I cant seem to fix it. I wanted to change some language for the Admin Controls Status field on pedit.php. I wanted to change the language from "Active" to "Active Member" But when I went to check it all I could see in the selector was the language key's. It looks like this...

_FieldValues_Unconfirmed
_FieldValues_Approval
_FieldValues_Active
_FieldValues_Rejected
Suspended

So I went to change the language back from "Active Member" to "Active"
but It didn't correct the problem. And when I try to save a members settings I fails and gives me the little red ! for that field, an error that says "Status hack attempt!"

I.ve cleared the cache,the public cache and my browser cache. I've recompiled the language file, recompled all the module langs. I whent into the Page Builder, Fields builder and wiggled the blocks. I checked all the language keys I could find, they look fine as far as I can tell. Here are the keys.



    '_Approval' => 'Approval',
    '__Approval' => 'Approval',
    '__Active' => 'Active',
    '__Suspended' => 'Suspended',
    '_Active' => 'Active',
    '_Suspended' => 'Suspended',

    '_FieldValues_Unconfirmed' => 'Unconfirmed',
    '_FieldValues_Approval' => 'Approval',
    '_FieldValues_Active' => 'Active',
    '_FieldValues_Rejected' => 'Rejected',
    '_FieldValues_Suspended' => 'Suspended',


    '_adm_txt_mp_approval' => 'approval',
    '_adm_txt_mp_active' => 'active',
    '_adm_txt_mp_featured' => 'featured',
    '_adm_txt_mp_banned' => 'banned',
    '_adm_txt_mp_suspended' => 'suspended',
    '_adm_txt_mp_unconfirmed' => 'unconfirmed',
    '_adm_txt_mp_rejected' => 'rejected',


What else can I do? And NO I didn't make a backup.
        

Give me something to believe in...
Quote · 10 Jul 2011

Just add these language keys through your language settings and then recompile the language.

----
Quote · 10 Jul 2011

What did you change besides the language keys when you first changed it?

Quote · 10 Jul 2011

 

Just add these language keys through your language settings and then recompile the language.

 I don't understand... Why add the key's if they already exist?

Give me something to believe in...
Quote · 10 Jul 2011

 

What did you change besides the language keys when you first changed it?

 I originally made the change from within in the database it's self. Then I tried to correct the issue in the database. And when that was unsuccessful I tried to correct it via the admin panel. Other than that I changed nothing else.

Give me something to believe in...
Quote · 10 Jul 2011

 

 

Just add these language keys through your language settings and then recompile the language.

 I don't understand... Why add the key's if they already exist?

 I think they're saying that if you change the name elsewhere, then add a language key for Active Member since there isn't one already (the existing one being named Active).

 

This is probably a typo in the 'fixed' database entry then. I didn't see anything in the database that was related, so I couldn't pull up the original setting. You might try installing a fresh test copy of Dolphin and compare the original database setting w/ the edited version that you have now to make sure they are the same.

 

And then just edit the language keys only and not the database when you want to make a change in the language!

Quote · 10 Jul 2011

Ok I think i'm getting closer to solving this. I checked the /cache/db_sys_profile_fields_5ee98b0ad5ec36d3e188516c7fc27263.php

And this what I see.

 

        array (
          'Name' => 'Status',
          'Type' => 'system',
          'Control' => NULL,
          'Extra' => '',
          'Min' => NULL,
          'Max' => NULL,
          'Values' =>
          array (
            0 => 'Unconfirmed
',
            1 => 'Approval
',
            2 => 'Active
',
            3 => 'Rejected
',
            4 => 'Suspended',

 

What the heck would cause this? Is it white spaces?

Give me something to believe in...
Quote · 11 Jul 2011

Did you clear the cache after the db edit the first time ?

https://dolphin-techs.com - Skype: Dolphin Techs
Quote · 11 Jul 2011

 yes.

Did you clear the cache after the db edit the first time ?

 

Give me something to believe in...
Quote · 11 Jul 2011

**** Solved it! ****

 

Ok, I found the problem and I am updating this post just in case someone else runs into the same or similar problem. After looking at all the code related to this function, I had not found anything wrong. So I decided to take a closer look at the sys_profile_fields in the database. Now just looking at through phpmyAdmin everything looked fine. It was only after I exported it was I able to see the problem. Somehow some extra information found it's way into there. See below:

 

(7, 'Status', 'system', NULL, '', NULL, NULL, 'Unconfirmed\r\nApproval\r\nActive\r\nRejected\r\nSuspended', 'LKey', '', 0, '', 0, 0, 0, 0, NULL, 0, NULL, 21, 1, 21, 1, 0, NULL, 17, 1, 17, 3, 0, 7, '', 0, NULL, 0, NULL, 0, NULL, 0, 0),

 

After I removed unwanted information it now works as it should.Wink

Give me something to believe in...
Quote · 12 Jul 2011
 
 
Below is the legacy version of the Boonex site, maintained for Dolphin.Pro 7.x support.
The new Dolphin solution is powered by UNA Community Management System.