Topic: Additional fields disappear

Forgive for my English
Additional fields disappear, I think an additional field then use in my news, but every 2 or 3 days is deleted, and I have to recreate it. I'm no expert in PHP and is no longer how to solve it.
A greeting and thank you very much.

Re: Additional fields disappear

We've got this issue too, no idea why!?

Re: Additional fields disappear

I think i've narrowed it down to the fields being stored in a cache file (/cdata/cache/conf.php) and therefore i'm guessing that somehow this is being wiped as cache is being cleared?

4 (edited by 2013-04-03 17:11:28)

Re: Additional fields disappear

In the latest update, .inc/tools.php has been updated from:

        $fx = fopen(SERVDIR.'/cdata/cache/conf.php', 'w');
        fwrite($fx, "<?php die(); ?>\n" . serialize($cfg) );
        fclose($fx);

with

        $fx = fopen(SERVDIR.'/cdata/conf.php', 'w');
        fwrite($fx, "<?php die(); ?>\n" . serialize($cfg) );
        fclose($fx);

Which i'm guessing should store the fields properly and not lose them.

Try updating?

Re: Additional fields disappear

Hello, thank you very much for your answers. I had already installed the 1.5.3 version, and still keeps happening anyway as helped me find the file that stores the variable. So now I have to work for.
For now I have changed the permissions of / cdata / conf.php to 545, have if I was not so far removed from. Keep working on the issue. Thank you again.

6 (edited by 2013-04-04 11:10:10)

Re: Additional fields disappear

Dear Users!


Please would you specify what actions exactly (step by step) do you do before to face this error?

Best regards,
CN Support team

Re: Additional fields disappear

There were no actions that led to this, it just happened.

Re: Additional fields disappear

Has happened again, again for no reason, seemingly.

Re: Additional fields disappear

Any chance of a solution?

10 (edited by 2013-05-22 12:35:08)

Re: Additional fields disappear

I just checked the cdata/conf.php file out of interest... Last updated 05/22/2013? It hasn't been accessed today... What is accessing this file that is making it lose it's data....? It seems this is being 'updated' every time cutenews is loaded from the frontend. I've just double checked the permissions on this file and i've changed it to 774, should this work?

11 (edited by 2013-05-22 15:42:14)

Re: Additional fields disappear

Hmm, could you please paste the contents of the file /cdata/conf.php ? I have a "lead," but have yet to confirm it.

Right now, I doubt that it's related to any file permissions. I think it's some error in the coding somewhere.

Also, if you remember the names of the additional fields you had, or if you remember what other settings you've edited around the time they disappeared, that information would be great, of course https://cutephp.com/forum/style_emoticons/default/smile.gif

12 (edited by 2013-05-23 12:21:51)

Re: Additional fields disappear

Hmm, could you please paste the contents of the file /cdata/conf.php ? I have a "lead," but have yet to confirm it.

Right now, I doubt that it's related to any file permissions. I think it's some error in the coding somewhere.

Also, if you remember the names of the additional fields you had, or if you remember what other settings you've edited around the time they disappeared, that information would be great, of course https://cutephp.com/forum/style_emoticons/default/smile.gif


No problem:

<?php die(); ?>
a:1:{s:11:"more_fields";a:2:{s:5:"intro";s:5:"Intro";s:5:"image";s:5:"Image";}}

Re: Additional fields disappear

Thanks a lot, Kristoff1875!

I'm afraid my hunch was a bad one... What I did was I edited the file and changed "Intro" to e.g. "introduction" as a test, whereupon it would just wipe the file. But that's because the length of the string just before the text (e.g. 5:"intro") has to be adjusted, too, or it will be messed up.
Since all the immediate handling of the data of that file is handled with PHP's own serialize() and unserialize(), it's impossible that there would be a bug like that in the code.

I'm still looking and trying things to reproduce the bug, but it's hard to really pin it down with all the code in CuteNews and having no idea where to look. https://cutephp.com/forum/style_emoticons/default/tongue.gif

Re: Additional fields disappear

No problem.

From memory, I think when it happened before, the file was completely wiped. I will check next time it happens.

Re: Additional fields disappear

Ok, it's happened again (Tuesday again....?!?!?!) conf.php:

<?php die(); ?>
b:0;

Re: Additional fields disappear

What did you do before? Anything "special" that you don't do every day? (Such as changing the settings, changing your password, creating a new user, ...)

I tried getting the bug myself but I just can't, so I have no idea where to look. This week is finals week for me, so it isn't exactly at the top of my list, but I'll look at it again on Thursday. This is really bothering me https://cutephp.com/forum/style_emoticons/default/tongue.gif

Re: Additional fields disappear

What did you do before? Anything "special" that you don't do every day? (Such as changing the settings, changing your password, creating a new user, ...)

I tried getting the bug myself but I just can't, so I have no idea where to look. This week is finals week for me, so it isn't exactly at the top of my list, but I'll look at it again on Thursday. This is really bothering me https://cutephp.com/forum/style_emoticons/default/tongue.gif

Did absolutely nothing, didn't even go to the website until this afternoon, and it was gone.

18 (edited by 2013-05-30 15:16:05)

Re: Additional fields disappear

OK, we're getting somewhere...

So no other users? Do you have anything in the error logs? (The file is /cdata/logs/dump.log, I think)
Comments are enabled?

If fields were there and then gone when you logged on the next time, we have two obvious possibilities:
- Something can go wrong when comments get added
- Something can go wrong during the login process

19 (edited by 2013-06-04 23:19:27)

Re: Additional fields disappear

OK, we're getting somewhere...

So no other users? Do you have anything in the error logs? (The file is /cdata/logs/dump.log, I think)
Comments are enabled?

If fields were there and then gone when you logged on the next time, we have two obvious possibilities:
- Something can go wrong when comments get added
- Something can go wrong during the login process

Well, I can't see anywhere to disable comments directly, but comments are set to only be a user, and self signup is disabled. Also the comment templates are blank.

Edit: However these errors have shown up...

1369159960|2013-05-21 19:12:40|Warning: disk_free_space(): Access is denied.  ; \inc\main.php:210;
1369159960|2013-05-21 19:12:40|Warning: disk_total_space(): Access is denied.  ; \inc\main.php:210;
1369159960|2013-05-21 19:12:40|Warning: Division by zero; \inc\main.php:210;
1369160052|2013-05-21 19:14:12|Warning: Invalid argument supplied for foreach(); \inc\tools.php:476;
1369172493|2013-05-21 22:41:33|Warning: disk_free_space(): Access is denied.  ; \inc\main.php:210;
1369172493|2013-05-21 22:41:33|Warning: disk_total_space(): Access is denied.  ; \inc\main.php:210;
1369172493|2013-05-21 22:41:33|Warning: Division by zero; \inc\main.php:210;
1369225423|2013-05-22 13:23:43|Warning: disk_free_space(): Access is denied.  ; \inc\main.php:210;
1369225423|2013-05-22 13:23:43|Warning: disk_total_space(): Access is denied.  ; \inc\main.php:210;
1369225423|2013-05-22 13:23:43|Warning: Division by zero; \inc\main.php:210;
1369225915|2013-05-22 13:31:55|Warning: disk_free_space(): Access is denied.  ; \inc\main.php:210;
1369225915|2013-05-22 13:31:55|Warning: disk_total_space(): Access is denied.  ; \inc\main.php:210;
1369225915|2013-05-22 13:31:55|Warning: Division by zero; \inc\main.php:210;
1369760447|2013-05-28 18:00:47|Warning: disk_free_space(): Access is denied.  ; \inc\main.php:210;
1369760447|2013-05-28 18:00:47|Warning: disk_total_space(): Access is denied.  ; \inc\main.php:210;
1369760447|2013-05-28 18:00:47|Warning: Division by zero; \inc\main.php:210;
1369760454|2013-05-28 18:00:54|Warning: Invalid argument supplied for foreach(); \inc\tools.php:476;

A lack of disc space removing fields?!

20 (edited by 2013-06-05 08:14:10)

Re: Additional fields disappear

Cool, thanks. Some explanations:

Warning: disk_free_space(): Access is denied. ; \inc\main.php:210;
Warning: disk_total_space(): Access is denied. ; \inc\main.php:210;
Warning: Division by zero; \inc\main.php:210;

    $factor = (int)(100 * (1 - disk_free_space('/') / disk_total_space('/')));


On the main admin page of CuteNews, there's a little table with some stats — among the rows is one that shows the free disk space. Your host probably disabled the functions disk_free_space() and disk_total_space(), so when CuteNews tries to use it, it produces an error. Since the functions are supposed to return a value, another problem appears ("Division by zero"); the code divides by the number it's supposed to get, but since it didn't get any, it's equals to 0.
Your free disk space is probably fine and CuteNews wouldn't randomly erase configuration files to gain more space. Especially not a little file that is probably around 1 KB, if not smaller.

Warning: Invalid argument supplied for foreach(); \inc\tools.php:476;

    foreach ($cfg['more_fields'] as $i => $v)


Now, this is already more relevant to our problem. This problem is twice in your logs, with timestamps 1369160052 (21st of May) and 1369760454 (28 May). Hmm... this code is in the section that deals with XFields. I was optimistic at first, but I'm afraid the only thing it tells us is that the fields weren't there anymore when you visited the XFields module. Well, it was a try, but this doesn't help much.

I have some time to spare today/tomorrow, so I'll look for any other instances where /cdata/conf.php is written to and we'll see from there.

21 (edited by 2013-06-06 20:12:42)

Re: Additional fields disappear

Cool thanks for this. Shame that it pretty much just says what we already knew though!

Re: Additional fields disappear

Just to say, this just happened again!

Re: Additional fields disappear

I have the same problem. I just installed 1.5.3 and created two additional fields. I started filling information into them, and then left for an hour or something. When I came back the fields were gone.

I manually created the fields again with similar names and the data I filled into them earlier is still there, but what the heck is going on here? I'm hesitant to use the fields even though I really need them.

Re: Additional fields disappear

It happened to me too!

I need the "More Fields" back!

Very important for me!

Re: Additional fields disappear

same thing here, any solution ?
thank you

Posts: 1 to 25 of 27

Pages 1 2 Next

You must login or register to post a reply

CutePHP Forums → Problem Solving / Help & Support → Additional fields disappear



The pun_antispam official extension is installed. Copyright © 2003–2009 PunBB.