NewscoopEntityWebcodeProxy::__toString() somthing broken
  • Method Newscoop\\Entity\\Proxy\\NewscoopEntityWebcodeProxy::__toString() must not throw an exception in /srv/www/htdocs/magyarszo4/www/library/Newscoop/Entity/Article.php on line 439

    How to solve the problem? How can I regenerate missing webcodes? What is the webcode?
  • 10 Comments sorted by
  • The problem is big. I see the web code in table webcode, but in article webcode not. When I copy the webcode from table webcode to table Article, everything works fine again. But today I must do this 3 time, and this is very flustrating.

    In log isn't any other error...
  • hi, was this after an update or fresh install? i don't think there is a function to populate it.
  • btw which newscoop version is it?
  • Fres install with version 4.0.2 updated to 4.0.3, and 4.0.4

    The system populates it always, but sometimes... I don't know why, article stored, but log don't, article edited by user with id 0, that is impossible, user with id 0 isn't activated.

    How can I get log if something is wrong when store data in database?
  • Nothing? Somebady? I have this problem every day! Can me anybody say what is this webcode?

    Here is what can you see, after missing webcode: processing forever

    image
    Post edited by Zsolt Baji at 2013-01-30 10:06:38
  • Hi Zsolt,

    I think the problem is in db schema, please make a dump of only schema, no data, and attach it here, we will check it out.

    FYI, the webcode is a unique code for every article, that you can use as a shortcut url, like in:

    http://mysite.org/+fo0b4r

    where fo0b4r is the webcode and + the webcode prefix.

  • Attached schema. Please help me to solve this problem.
  • Nothing...??? The problem is very flustrating! Why need to store equal data in two tables? Can I make a view from table Articles to solve this problem?
  • Here is a workaround, but not a solution...

    Run this query every 60 sec:

    UPDATE [yourdatabasename].Articles AS a SET a.webcode = (
        SELECT w.webcode FROM [yourdatabasename].webcode AS w WHERE w.article_number=a.Number AND w.language_id = a.IdLanguage
    )
    WHERE
    a.webcode = ''


    You can run it from mysql event scheduler or from linux cron. This solve the problem within 60 sec and you can work again with newscoop.

    BUt this is not a solution. I nedd solution if anybody have it, or anything from information to find what hepend - can't find anything in logs!



  • hi, would it be an option to debug it on your install? if yes can u send me your site credentials (ssh) via pm?