Simple Machines Community Forum

SMF Support => Language Specific Support => Italiano (Italian) => Topic started by: cluaudiuzz on December 31, 2012, 11:22:32 AM

Title: Problema con mod similar topics
Post by: cluaudiuzz on December 31, 2012, 11:22:32 AM
Salve a tutti,
Ho installato questa mod http://custom.simplemachines.org/mods/index.php?mod=3473 che si chiama similar topics.
L'installazione non ha mostrato errori. E' stata  installata anche su un tema diverso da quello di default.
La mod funziona perfettamente nelle categorie del forum in cui essa viene abilitata, perché a fondo pagina mostra i topics simili a quelli che si sta leggendo in quel momento.
Invece, se la si abilita nella schermata per i nuovi topics, sembra non funzionare in quanto non appare nessun risultato.
Allego un immagine che mostra il problema. Apprare un scritta Caricamento in corso.... ma non appare nessun risultato, neanche se si riscrive per intero il titolo di un topic già aperto.
Il problema persiste anche se si cambia tema o se si utilizza il tema di default.
Come si potrebbe risolvere?
Grazie mille


Title: Re: Problema con mod similar topics
Post by: emanuele on December 31, 2012, 11:41:50 AM
Il mod per fare quell'efetto utilizza ajax. Quindi via javascript "chiama" il forum e si fa dire (in formato xml) se esistono risultati da mostrare.

Quel che sospetto è che per una ragione o un'altra il formato della risposta non è javascript e quindi javascript non è in grado di interpretare la risposta.
L'unica cosa è vedere cosa viene ritornato (ad esempio usando firefox e firebug) e cercare di capire dove si trova l'errore...
Title: Re: Problema con mod similar topics
Post by: cluaudiuzz on December 31, 2012, 12:06:16 PM
Se vado su firebug e poi console non vedo punti di arresto/errori relativi a questa mod.
cosa vuoi che ti posto per risolvere il problema?
Potrebbe essere relativo ai cookie? Attualmente impostati su smfcookie11 ( su consiglio di setting_repair  :D )
Title: Re: Problema con mod similar topics
Post by: emanuele on December 31, 2012, 12:39:42 PM
Che errori sono?
Title: Re: Problema con mod similar topics
Post by: cluaudiuzz on December 31, 2012, 01:17:21 PM
In effetti ricaricando la pagina se apro SCRIPT, mi esce questo messaggio :    

JSON.parse: unexpected character
Per attivare/disattivare questo avviso utilizzare la relativa opzione nel menu della scheda del pannello

mi rileva questa linea :


(function(a,b){function cy(a){return f.isWindow(a)?a:a.nodeType===9?a.defaultView||a.parentWindow:!1}function cv(a){if(!cj[a]){var b=f("<"+a+">").appendTo("body"),d=b.css("display");b.remove();if(d==="none"||d===""){ck||(ck=c.createElement("iframe"),ck.frameBorder=ck.width=ck.height=0),c.body.appendChild(ck);if(!cl||!ck.createElement)cl=(ck.contentWindow||ck.contentDocument).document,cl.write("<!doctype><html><body></body></html>");b=cl.createElement(a),cl.body.appendChild(b),d=f.css(b,"display"),c.body.removeChild(ck)}cj[a]=d}return cj[a]}function cu(a,b){var c={};f.each(cp.concat.apply([],cp.slice(0,b)),function(){c[this]=a});return c}function ct(){cq=b}function cs(){setTimeout(ct,0);return cq=f.now()}function ci(){try{return new a.ActiveXObject("Microsoft.XMLHTTP")}catch(b){}}function ch(){try{return new a.XMLHttpRequest}catch(b){}}function cb(a,c){a.dataFilter&&(c=a.dataFilter(c,a.dataType));var d=a.dataTypes,e={},g,h,i=d.length,j,k=d[0],l,m,n,o,p;for(g=1;g<i;g++){if(g===1)for(h in a.converters)typeof h=="string"&&(e[h.toLowerCase()]=a.converters[h]);l=k,k=d[g];if(k==="*")k=l;else if(l!=="*"&&l!==k){m=l+" "+k,n=e[m]||e["* "+k];if(!n){p=b;for(o in e){j=o.split(" ");if(j[0]===l||j[0]==="*"){p=e[j[1]+" "+k];if(p){o=e[o],o===!0?n=p:p===!0&&(n=o);break}}}}!n&&!p&&f.error("No conversion from "+m.replace(" "," to ")),n!==!0&&(c=n?n(c):p(o(c)))}}return c}function ca(a,c,d){var e=a.contents,f=a.dataTypes,g=a.responseFields,h,i,j,k;for(i in g)i in d&&(c[g[i]]=d[i]);while(f[0]==="*")f.shift(),h===b&&(h=a.mimeType||c.getResponseHeader("content-type"));if(h)for(i in e)if(e[i]&&e[i].test(h)){f.unshift(i);break}if(f[0]in d)j=f[0];else{for(i in d){if(!f[0]||a.converters[i+" "+f[0]]){j=i;break}k||(k=i)}j=j||k}if(j){j!==f[0]&&f.unshift(j);return d[j]}}function b_(a,b,c,d){if(f.isArray(b))f.each(b,function(b,e){c||bF.test(a)?d(a,e):b_(a+"["+(typeof e=="object"||f.isArray(e)?b:"")+"]",e,c,d)});else if(!c&&b!=null&&typeof b=="object")for(var e in b)b_(a+"["+e+"]",b[e],c,d);else d(a,b)}function b$(a,c,d,e,f,g){f=f||c.dataTypes[0],g=g||{},g[f]=!0;var h=a[f],i=0,j=h?h.length:0,k=a===bU,l;for(;i<j&&(k||!l);i++)l=h[i](c,d,e),typeof l=="string"&&(!k||g[l]?l=b:(c.dataTypes.unshift(l),l=b$(a,c,d,e,l,g)));(k||!l)&&!g["*"]&&(l=b$(a,c,d,e,"*",g));return l}function bZ(a){return function(b,c){typeof b!="string"&&(c=b,b="*");if(f.isFunction(c)){var d=b.toLowerCase().split(bQ),e=0,g=d.length,h,i,j;for(;e<g;e++)h=d[e],j=/^\+/.test(h),j&&(h=h.substr(1)||"*"),i=a[h]=a[h]||[],i[j?"unshift":"push"](c)}}}function bD(a,b,c){var d=b==="width"?bx:by,e=b==="width"?a.offsetWidth:a.offsetHeight;if(c==="border")return e;f.each(d,function(){c||(e-=parseFloat(f.css(a,"padding"+this))||0),c==="margin"?e+=parseFloat(f.css(a,"margin"+this))||0:e-=parseFloat(f.css(a,"border"+this+"Width"))||0});return e}function bn(a,b){b.src?f.ajax({url:b.src,async:!1,dataType:"script"}):f.globalEval((b.text||b.textContent||b.innerHTML||"").replace(bf,"/*$0*/")),b.parentNode&&b.parentNode.removeChild(b)}function bm(a){f.nodeName(a,"input")?bl(a):a.getElementsByTagName&&f.grep(a.getElementsByTagName("input"),bl)}function bl(a){if(a.type==="checkbox"||a.type==="radio")a.defaultChecked=a.checked}function bk(a){return"getElementsByTagName"in a?a.getElementsByTagName("*"):"querySelectorAll"in a?a.querySelectorAll("*"):[]}function bj(a,b){var c;if(b.nodeType===1){b.clearAttributes&&b.clearAttributes(),b.mergeAttributes&&b.mergeAttributes(a),c=b.nodeName.toLowerCase();if(c==="object")b.outerHTML=a.outerHTML;else if(c!=="input"||a.type!=="checkbox"&&a.type!=="radio"){if(c==="option")b.selected=a.defaultSelected;else if(c==="input"||c==="textarea")b.defaultValue=a.defaultValue}else a.checked&&(b.defaultChecked=b.checked=a.checked),b.value!==a.value&&(b.value=a.value);b.removeAttribute(f.expando)}}function bi(a,b){if(b.nodeType===1&&!!f.hasData(a)){var c=f.expando,d=f.data(a),e=f.data(b,d);if(d=d[c]){var g=d.events;e=e[c]=f.extend({},d);if(g){delete e.handle,e.events={};for(var h in g)for(var i=0,j=g[h].length;i<j;i++)f.event.add(b,h+(g[h][i].namespace?".":"")+g[h][i].namespace,g[h][i],g[h][i].data)}}}}function bh(a,b){return f.nodeName(a,"table")?a.getElementsByTagName("tbody")[0]||a.appendChild(a.ownerDocument.createElement("tbody")):a}function X(a,b,c){b=b||0;if(f.isFunction(b))return f.grep(a,function(a,d){var e=!!b.call(a,d,a);return e===c});if(b.nodeType)return f.grep(a,function(a,d){return a===b===c});if(typeof b=="string"){var d=f.grep(a,function(a){return a.nodeType===1});if(S.test(b))return f.filter(b,d,!c);b=f.filter(b,d)}return f.grep(a,function(a,d){return f.inArray(a,b)>=0===c})}function W(a){return!a||!a.parentNode||a.parentNode.nodeType===11}function O(a,b){return(a&&a!=="*"?a+".":"")+b.replace(A,"`").replace(B,"&")}function N(a){var b,c,d,e,g,h,i,j,k,l,m,n,o,p=[],q=[],r=f._data(this,"events");if(!(a.liveFired===this||!r||!r.live||a.target.disabled||a.button&&a.type==="click")){a.namespace&&(n=new RegExp("(^|\\.)"+a.namespace.split(".").join("\\.(?:.*\\.)?")+"(\\.|...abIndex:{get:function(a){var c=a.getAttributeNode("tabIndex");return c&&c.specified?parseInt(c.value,10):r.test(a.nodeName)||s.test(a.nodeName)&&a.href?0:b}}},propFix:{tabindex:"tabIndex",readonly:"readOnly","for":"htmlFor","class":"className",maxlength:"maxLength",cellspacing:"cellSpacing",cellpadding:"cellPadding",rowspan:"rowSpan",colspan:"colSpan",usemap:"useMap",frameborder:"frameBorder",contenteditable:"contentEditable"},prop:function(a,c,d){var e=a.nodeType;if(!a||e===3||e===8||e===2)return b;var g,h,i=e!==1||!f.isXMLDoc(a);c=i&&f.propFix[c]||c,h=f.propHooks[c];return d!==b?h&&"set"in h&&(g=h.set(a,d,c))!==b?g:a[c]=d:h&&"get"in h&&(g=h.get(a,c))!==b?g:a[c]},propHooks:{}}),w={get:function(a,c){return a[f.propFix[c]||c]?c.toLowerCase():b},set:function(a,b,c){var d;b===!1?f.removeAttr(a,c):(d=f.propFix[c]||c,d in a&&(a[d]=b),a.setAttribute(c,c.toLowerCase()));return c}},f.attrHooks.value={get:function(a,b){if(v&&f.nodeName(a,"button"))return v.get(a,b);return a.value},set:function(a,b,c){if(v&&f.nodeName(a,"button"))return v.set(a,b,c);a.value=b}},f.support.getSetAttribute||(f.attrFix=f.propFix,v=f.attrHooks.name=f.valHooks.button={get:function(a,c){var d;d=a.getAttributeNode(c);return d&&d.nodeValue!==""?d.nodeValue:b},set:function(a,b,c){var d=a.getAttributeNode(c);if(d){d.nodeValue=b;return b}}},f.each(["width","height"],function(a,b){f.attrHooks[b]=f.extend(f.attrHooks[b],{set:function(a,c){if(c===""){a.setAttribute(b,"auto");return c}}})})),f.support.hrefNormalized||f.each(["href","src","width","height"],function(a,c){f.attrHooks[c]=f.extend(f.attrHooks[c],{get:function(a){var d=a.getAttribute(c,2);return d===null?b:d}})}),f.support.style||(f.attrHooks.style={get:function(a){return a.style.cssText.toLowerCase()||b},set:function(a,b){return a.style.cssText=""+b}}),f.support.optSelected||(f.propHooks.selected=f.extend(f.propHooks.selected,{get:function(a){var b=a.parentNode;b&&(b.selectedIndex,b.parentNode&&b.parentNode.selectedIndex)}})),f.support.checkOn||f.each(["radio","checkbox"],function(){f.valHooks[this]={get:function(a){return a.getAttribute("value")===null?"on":a.value}}}),f.each(["radio","checkbox"],function(){f.valHooks[this]=f.extend(f.valHooks[this],{set:function(a,b){if(f.isArray(b))return a.checked=f.inArray(f(a).val(),b)>=0}})});var x=Object.prototype.hasOwnProperty,y=/\.(.*)$/,z=/^(?:textarea|input|select)$/i,A=/\./g,B=/ /g,C=/[^\w\s.|`]/g,D=function(a){return a.replace(C,"\\$&")};f.event={add:function(a,c,d,e){if(a.nodeType!==3&&a.nodeType!==8){if(d===!1)d=E;else if(!d)return;var g,h;d.handler&&(g=d,d=g.handler),d.guid||(d.guid=f.guid++);var i=f._data(a);if(!i)return;var j=i.events,k=i.handle;j||(i.events=j={}),k||(i.handle=k=function(a){return typeof f!="undefined"&&(!a||f.event.triggered!==a.type)?f.event.handle.apply(k.elem,arguments):b}),k.elem=a,c=c.split(" ");var l,m=0,n;while(l=c[m++]){h=g?f.extend({},g):{handler:d,data:e},l.indexOf(".")>-1?(n=l.split("."),l=n.shift(),h.namespace=n.slice(0).sort().join(".")):(n=[],h.namespace=""),h.type=l,h.guid||(h.guid=d.guid);var o=j[l],p=f.event.special[l]||{};if(!o){o=j[l]=[];if(!p.setup||p.setup.call(a,e,n,k)===!1)a.addEventListener?a.addEventListener(l,k,!1):a.attachEvent&&a.attachEvent("on"+l,k)}p.add&&(p.add.call(a,h),h.handler.guid||(h.handler.guid=d.guid)),o.push(h),f.event.global[l]=!0}a=null}},global:{},remove:function(a,c,d,e){if(a.nodeType!==3&&a.nodeType!==8){d===!1&&(d=E);var g,h,i,j,k=0,l,m,n,o,p,q,r,s=f.hasData(a)&&f._data(a),t=s&&s.events;if(!s||!t)return;c&&c.type&&(d=c.handler,c=c.type);if(!c||typeof c=="string"&&c.charAt(0)==="."){c=c||"";for(h in t)f.event.remove(a,h+c);return}c=c.split(" ");while(h=c[k++]){r=h,q=null,l=h.indexOf(".")<0,m=[],l||(m=h.split("."),h=m.shift(),n=new RegExp("(^|\\.)"+f.map(m.slice(0).sort(),D).join("\\.(?:.*\\.)?")+"(\\.|$)")),p=t[h];if(!p)continue;if(!d){for(j=0;j<p.length;j++){q=p[j];if(l||n.test(q.namespace))f.event.remove(a,r,q.handler,j),p.splice(j--,1)}continue}o=f.event.special[h]||{};for(j=e||0;j<p.length;j++){q=p[j];if(d.guid===q.guid){if(l||n.test(q.namespace))e==null&&p.splice(j--,1),o.remove&&o.remove.call(a,q);if(e!=null)break}}if(p.length===0||e!=null&&p.length===1)(!o.teardown||o.teardown.call(a,m)===!1)&&f.removeEvent(a,h,s.handle),g=null,delete t[h]}if(f.isEmptyObject(t)){var u=s.handle;u&&(u.elem=null),delete s.events,delete s.handle,f.isEmptyObject(s)&&f.removeData(a,b,!0)}}},customEvent:{getData:!0,setData:!0,changeData:!0},trigger:function(c,d,e,g){var h=c.type||c,i=[],j;h.indexOf("!")>=0&&(h=h.slice(0,-1),j=!0),h.indexOf(".")>=0&&(i=h.split("."),h=i.shift(),i.sort());if(!!e&&!f.event.customEvent[h]||!!f.event.global[h]){c=typeof c=="object"?c[f.expando]?c:new f.Event(h,c):new f.Event(h),c.type=h,c.exclusive=j,c.namespace=i.join("."),c.namespace_re=new RegExp("(^|\\.)"+i.join("\\.(?:.*\\.)?")+"(\\.|$)");if(g||!e)c.preventDefault(),c.stopPropagation();if(!e){f.each(f.cache,function(){var a=f.expando,b=this[a];b&&b.events&&b.events[h]&&f.event.trigger(c,d,b.handle.elem


Mentre su analizza :
Window.menubar


undefined


this
Window index.php?action=post;board=62.0

b


"You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '.smf_settings' at line 2"


arguments


[

"You have an error in yo...smf_settings' at line 2"

]


0


"You have an error in yo...smf_settings' at line 2"


Closure Scope
Closure Scope { toString=function()}

Closure Scope
Closure Scope { toString=function()}

Window
Window index.php?action=post;board=62.0
Title: Re: Problema con mod similar topics
Post by: cluaudiuzz on December 31, 2012, 01:43:05 PM
Nella tabella errori invece non risultano errori...( 1 riguarda una foto il cui percorso è errato e quindi non si vede ma non centra con la modifica in questione)
Title: Re: Problema con mod similar topics
Post by: emanuele on December 31, 2012, 03:13:44 PM
Apparentemente c'è una query sballata...in un'installazione pulita funziona, quindi deve essere un problema con qualche altro mod...
Non posso ipotizzare altro.

Strano però che nel log degli errori non venga riportata la query che fallisce... ???
Title: Re: Problema con mod similar topics
Post by: cluaudiuzz on January 01, 2013, 11:07:42 AM
non c'è proprio modo di risalire a questa query? mi potresti dire dove cercare?  ;)

Title: Re: Problema con mod similar topics
Post by: cluaudiuzz on January 01, 2013, 11:24:06 AM
Ecco cosa ottengo se tendo di installare alcune mod? può centrare qualcosa con l'errore in questione?


MySQL server has gone away
File: /home/miosito/public_html/Sources/Packages.php
Riga: 844

Nota: Sembra che il tuo database debba essere aggiornato. I file del forum risultano attualmente alla versione SMF 2.0.3, mentre il database corrisponde alla versione 2.0.2. Il problema potrebbe essere risolto eseguendo l'ultima versione del file upgrade.php.
Title: Re: Problema con mod similar topics
Post by: emanuele on January 01, 2013, 12:14:35 PM
Quote from: cluaudiuzz on January 01, 2013, 11:07:42 AM
non c'è proprio modo di risalire a questa query? mi potresti dire dove cercare?  ;)
Da qualche parte nel codice del tuo forum...purtroppo non sapendo cosa hai installato non posso essere più preciso di così.
Parrebbe avere a che fare con la tabella settins, prova a cercare {db_prefix}settings in una normale installazione dovrebbe apparire 16 volte, non molte da controllare...

Quote from: cluaudiuzz on January 01, 2013, 11:24:06 AM
Ecco cosa ottengo se tendo di installare alcune mod? può centrare qualcosa con l'errore in questione?
Niente a che vedere.
"MySQL server has gone away" significa che il server MySQL è morto per qualche ragione ignota ad SMF.
Title: Re: Problema con mod similar topics
Post by: cluaudiuzz on January 01, 2013, 01:10:50 PM
Se navigo sul forum con firebug rilevo anche questo avviso :

ActiveXObject is not defined

Evidenziandomi questa riga:

EBG.Adaptors.FlashDetector.prototype={version:0,_init:function(){var a=-1;try{a=(new ActiveXObject("Shockwaveflash.Shockwaveflash.7")).GetVariable("$version"),a=this._splitFlashMajorMinorVersions(a),a=Number(a)}catch(b){}if(-1==a)try{var c=0,d=0,e=0;if(null!=navigator.plugins&&0<navigator.plugins.length){if(navigator.plugins["Shockwave Flash"]){var f=navigator.plugins["Shockwave Flash"].description.split(" "),g=f[2].split("."),c=g[0],d=g[1],e=f[3];""==e&&(e=f[4]);isNaN(e[0])&&(e=e.substring(1));0<

Di cosa si tratta? centra qualcosa?
Title: Re: Problema con mod similar topics
Post by: emanuele on January 01, 2013, 01:29:35 PM
No.
Title: Re: Problema con mod similar topics
Post by: cluaudiuzz on January 01, 2013, 01:43:11 PM
Scusami emanuele non so dove cercare {db_prefix}settings
Devo aprire tutti i file di ogni cartella?
Grazie
Title: Re: Problema con mod similar topics
Post by: emanuele on January 01, 2013, 02:30:33 PM
Ricerca all'interno di tutti i file...credo che windows possa farlo...
Altrimenti puoi usare qualcosa tipo notepad++ o programmer's notepad e fare la ricerca da lì dentro. ;)
Title: Re: Problema con mod similar topics
Post by: cluaudiuzz on January 02, 2013, 09:17:25 AM
Ciao emanuele ecco i risultati della ricerca, sperando che tu riesca ad interpretarli ( ho inserito la il risultato e la porzione di codice di riferimento):

Search "{db_prefix}settings" (25 hits in 12 files)

\sachat\index.php (1 hits)
Line 83: FROM {db_prefix}settings',

[code]$results = $smcFunc['db_query']('', '
SELECT variable, value
FROM {db_prefix}settings',
array()
);


\forum\Sources\Load.php (1 hits)
   Line 144:          FROM {db_prefix}settings',

if (($modSettings = cache_get_data('modSettings', 90)) == null)
{
$request = $smcFunc['db_query']('', '
SELECT variable, value
FROM {db_prefix}settings',
array(
)
);


\Sources\Load.php~ (1 hits)
   Line 144:          FROM {db_prefix}settings',

\Sources\ManageSearch.php (1 hits)
   Line 721:          DELETE FROM {db_prefix}settings

if ($context['step'] === 3)
{
$context['sub_template'] = 'create_index_done';

updateSettings(array('search_index' => 'custom', 'search_custom_index_config' => serialize($context['index_settings'])));
$smcFunc['db_query']('', '
DELETE FROM {db_prefix}settings
WHERE variable = {string:search_custom_index_resume}',
array(
'search_custom_index_resume' => 'search_custom_index_resume',
)
);
}
}


\Sources\ScheduledTasks.php (8 hits)
   Line 472:          DELETE FROM {db_prefix}settings
   Line 487:          DELETE FROM {db_prefix}settings
// Check the database version - for some buggy MySQL version.
$server_version = $smcFunc['db_server_info']();
if ($db_type == 'mysql' && in_array(substr($server_version, 0, 6), array('5.0.50', '5.0.51')))
updateSettings(array('db_mysql_group_by_fix' => '1'));
elseif (!empty($modSettings['db_mysql_group_by_fix']))
$smcFunc['db_query']('', '
DELETE FROM {db_prefix}settings
WHERE variable = {string:mysql_fix}',
array(
'mysql_fix' => 'db_mysql_group_by_fix',
)
);

// Regenerate the Diffie-Hellman keys if OpenID is enabled.
if (!empty($modSettings['enableOpenID']))
{
require_once($sourcedir . '/Subs-OpenID.php');
smf_openID_setup_DH(true);
}
elseif (!empty($modSettings['dh_keys']))
$smcFunc['db_query']('', '
DELETE FROM {db_prefix}settings
WHERE variable = {string:dh_keys}',
array(
'dh_keys' => 'dh_keys',
)
);


   Line 884:          UPDATE {db_prefix}settings

// By default move the next sending on by 10 seconds, and require an affected row.
if (!$override_limit)
{
$delay = !empty($modSettings['mail_queue_delay']) ? $modSettings['mail_queue_delay'] : (!empty($modSettings['mail_limit']) && $modSettings['mail_limit'] < 5 ? 10 : 5);

$smcFunc['db_query']('', '
UPDATE {db_prefix}settings
SET value = {string:next_mail_send}
WHERE variable = {string:mail_next_send}
AND value = {string:last_send}',
array(
'next_mail_send' => time() + $delay,
'mail_next_send' => 'mail_next_send',
'last_send' => $modSettings['mail_next_send'],
)
);
if ($smcFunc['db_affected_rows']() == 0)
return false;
$modSettings['mail_next_send'] = time() + $delay;
}


   Line 963:          UPDATE {db_prefix}settings

// Only update the setting if no-one else has beaten us to it.
$smcFunc['db_query']('', '
UPDATE {db_prefix}settings
SET value = {string:no_send}
WHERE variable = {string:mail_next_send}
AND value = {string:last_mail_send}',
array(
'no_send' => '0',
'mail_next_send' => 'mail_next_send',
'last_mail_send' => $modSettings['mail_next_send'],
)
);
}


   Line 1024:             UPDATE {db_prefix}settings

// If we have failed to many times, tell mail to wait a bit and try again.
if ($modSettings['mail_failed_attempts'] > 5)
$smcFunc['db_query']('', '
UPDATE {db_prefix}settings
SET value = {string:mail_next_send}
WHERE variable = {string:next_mail_send}
AND value = {string:last_send}',
array(
'next_mail_send' => time() + 60,
'mail_next_send' => 'mail_next_send',
'last_send' => $modSettings['mail_next_send'],
));


   Line 1047:          UPDATE {db_prefix}settings
// We where unable to send the email, clear our failed attempts.
elseif (!empty($modSettings['mail_failed_attempts']))
$smcFunc['db_query']('', '
UPDATE {db_prefix}settings
SET value = {string:zero}
WHERE variable = {string:mail_failed_attempts}',
array(
'zero' => '0',
'mail_failed_attempts' => 'mail_failed_attempts',
));

   Line 1390:       DELETE FROM {db_prefix}settings
$smcFunc['db_query']('', '
DELETE FROM {db_prefix}settings
WHERE variable IN ({array_string:setting_list})
AND (value = {string:zero_value} OR value = {string:blank_value})',
array(
'zero_value' => '0',
'blank_value' => '',
'setting_list' => $emptySettings,
)
);


   Line 1406:       DELETE FROM {db_prefix}settings
// Some settings we never want to keep - they are just there for temporary purposes.
$deleteAnywaySettings = array(
'attachment_full_notified',
);

$smcFunc['db_query']('', '
DELETE FROM {db_prefix}settings
WHERE variable IN ({array_string:setting_list})',
array(
'setting_list' => $deleteAnywaySettings,
)
);


\Sources\Subs.php (3 hits)
   Line 581:             UPDATE {db_prefix}settings
// In some cases, this may be better and faster, but for large sets we don't want so many UPDATEs.
if ($update)
{
foreach ($changeArray as $variable => $value)
{
$smcFunc['db_query']('', '
UPDATE {db_prefix}settings
SET value = {' . ($value === false || $value === true ? 'raw' : 'string') . ':value}
WHERE variable = {string:variable}',
array(
'value' => $value === true ? 'value + 1' : ($value === false ? 'value - 1' : $value),
'variable' => $variable,
)
);
$modSettings[$variable] = $value === true ? $modSettings[$variable] + 1 : ($value === false ? $modSettings[$variable] - 1 : $value);
}

   Line 4263:          FROM {db_prefix}settings
// Is it going to be permanent?
if ($permanent)
{
$request = $smcFunc['db_query']('', '
SELECT value
FROM {db_prefix}settings
WHERE variable = {string:variable}',
array(
'variable' => $hook,
)
);
list($current_functions) = $smcFunc['db_fetch_row']($request);
$smcFunc['db_free_result']($request);

if (!empty($current_functions))
{
$current_functions = explode(',', $current_functions);
if (in_array($function, $current_functions))
return;

$permanent_functions = array_merge($current_functions, array($function));
}
else
$permanent_functions = array($function);

updateSettings(array($hook => implode(',', $permanent_functions)));
}

   Line 4305:       FROM {db_prefix}settings
// Get the permanent functions.
$request = $smcFunc['db_query']('', '
SELECT value
FROM {db_prefix}settings
WHERE variable = {string:variable}',
array(
'variable' => $hook,
)
);
list($current_functions) = $smcFunc['db_fetch_row']($request);
$smcFunc['db_free_result']($request);

if (!empty($current_functions))
{
$current_functions = explode(',', $current_functions);

if (in_array($function, $current_functions))
updateSettings(array($hook => implode(',', array_diff($current_functions, array($function)))));
}

\Sources\Subs.php~ (3 hits)
   Line 581:             UPDATE {db_prefix}settings
   Line 4334:          FROM {db_prefix}settings
   Line 4376:       FROM {db_prefix}settings
\Sources\Subs-Post.php (1 hits)
   Line 817:          UPDATE {db_prefix}settings
/ If we're flushing we're done.
if ($flush)
{
$nextSendTime = time() + 10;

$smcFunc['db_query']('', '
UPDATE {db_prefix}settings
SET value = {string:nextSendTime}
WHERE variable = {string:mail_next_send}
AND value = {string:no_outstanding}',
array(
'nextSendTime' => $nextSendTime,
'mail_next_send' => 'mail_next_send',
'no_outstanding' => '0',
)
);

return true;
}


\Sources\TreasuryAdmin.php (2 hits)
   Line 2953:          UPDATE {db_prefix}settings
   Line 2975:          UPDATE {db_prefix}settings
\Sources\TreasuryUpdate.php (2 hits)
   Line 145:          UPDATE {db_prefix}settings
   Line 167:          UPDATE {db_prefix}settings
$grouplog .= '<br />Group duration check updated.';

} else {

$request6 = $smcFunc['db_query']('', '

UPDATE {db_prefix}settings

SET value = 0

WHERE variable = {string:groupcheck}',

array(

'groupcheck' => 'treasury_groupcheck',

)

);

$grouplog .= '<br />Group duration check now empty.';

}

\ENotify2.0.2\install.php (1 hits)
   Line 36: INSERT IGNORE INTO {db_prefix}settings
\similar_topics\uninstall.php (1 hits)
   Line 12: $smcFunc['db_query']('', "DELETE FROM {db_prefix}settings WHERE variable LIKE 'simtopics_%'");[/code]
Title: Re: Problema con mod similar topics
Post by: emanuele on January 02, 2013, 03:12:41 PM
mmm...non vedo niente di strano...
Ripropongo la domanda che non mi pare abbia avuto una risposta: hai guardato nel log degli errori? Una query che da fallisce a quel modo dovrebbe generare un errore (critico).
Title: Re: Problema con mod similar topics
Post by: cluaudiuzz on January 03, 2013, 11:02:00 AM
Nel file error_log ho questo messaggio che viene ripetuto una infinita di volte tutti uguali (ripetono anche lo stesso giorno e la stessa ora):
parte dal
[28-Dec-2012 11:46:20 UTC] PHP Warning:  mysql_real_escape_string() expects parameter 2 to be resource, boolean given in /home/mionome/public_html/forum/Sources/Subs-Db-mysql.php on line 132
fino al
[03-Jan-2013 05:37:26 UTC] PHP Warning:  mysql_real_escape_string() expects parameter 2 to be resource, boolean given in /home/mionome/public_html/Sources/Subs-Db-mysql.php on line 132
Dopo un elenco infinito di segnalazioni degli errori indicati sopra appare quest'altro errore (uno per ogni giorno di riferimento):
[03-Jan-2013 05:37:26 UTC] PHP Fatal error:  Allowed memory size of 33554432 bytes exhausted (tried to allocate 71 bytes) in /home/mionome/public_html/Sources/Subs-Db-mysql.php on line 651

Ecco la parte di codice di riferimento :
// This function tries to work out additional error information from a back trace.
function smf_db_error_backtrace($error_message, $log_message = '', $error_type = false, $file = null, $line = null)
{
if (empty($log_message))
$log_message = $error_message;

if (function_exists('debug_backtrace'))
{
foreach (debug_backtrace() as $step)
{
// Found it?
if (strpos($step['function'], 'query') === false && !in_array(substr($step['function'], 0, 7), array('smf_db_', 'preg_re', 'db_erro', 'call_us')) && substr($step['function'], 0, 2) != '__')
{
$log_message .= '<br />Function: ' . $step['function'];
break;
}

if (isset($step['line']))
{
$file = $step['file'];
$line = $step['line'];
}
}
}

Dato che io , come  tu ben sai, ho spostato tutto forum ( cartelle e file :) ) da una cartella /forum/ nella directory principale , probabilmente questo problema è dovuto al fatto che fa riferimento alla locazione vecchia.
La cartella /forum/ ancora esiste sul mio hosting e contiene la cartella Source, non la voglio cancellare per paura che succede qualcosa...:)
Cmq la linea 132 a cui fa riferimento l'errore è questa :
return sprintf('\'%1$s\'', mysql_real_escape_string($replacement, $connection));

tu che dici? Come posso risolverlo, in non so proprio da dove iniziare..
Title: Re: Problema con mod similar topics
Post by: emanuele on January 03, 2013, 11:21:08 AM
Io a dir la verità pensavo a qualcosa di più semplice del log di apache...tipo: admin > manutenzione > log > log degli errori...
Title: Re: Problema con mod similar topics
Post by: cluaudiuzz on January 03, 2013, 07:44:18 PM
a dire la verità avevo già visto, riducendo il campo al settore database si possono vedere solo alcuni errori relativi all'installazione andata male di alcune mod che poi ho rimosso:

http://miosito/index.php?action=admin;area=packages;sa=install2;package=SMFSIMPLE_Bookmarks.zip;pid=0Errore del Database: Incorrect table name 'mionome.smf_topics'File: /home/mionome/public_html/Packages/temp/install_db.php
Riga: 48

http://www.miosito.com/index.php?action=admin;area=packages;sa=install2;package=SMFSIMPLE_Bookmarks.zip;pid=0Errore del Database: Incorrect table name 'mionome.smf_topics'File: /home/mionome/public_html/Packages/temp/install_db.php
Riga: 48

http://www.miosito.com/index.php?action=admin;area=packages;sa=install2;package=SMF_Links_DIrectory_Lite_1.0.zip;pid=0Errore del Database: Incorrect table name 'tuttonum_forum.smf_links_categories'File: /home/mionome/public_html/Packages/temp/db_links.php
Riga: 265

http://www.miosito.com/index.php?action=admin;area=packages;sa=install2;package=SMF_Links_DIrectory_Lite_1.0.zip;pid=0Errore del Database: Incorrect table name 'mionome.smf_links_categories'File: /home/mionome/public_html/Packages/temp/db_links.php
Riga: 265

http://www.miosito.com/index.php?action=admin;area=packages;sa=install2;package=SMF_Links_DIrectory_Lite_1.0.zip;pid=0Errore del Database: Incorrect table name 'mionome.smf_links_categories'File: /home/mionome/public_html/Packages/temp/db_links.php
Riga: 265

http://www.miosito.com/index.php?action=admin;area=packages;sa=install2;package=postkarma_1.zip;pid=0Errore del Database: Incorrect table name 'mionome.smf_messages'File: /home/mionome/public_html/Packages/temp/db.php
Riga: 21

http://www.miosito.com/index.php?action=admin;area=packages;sa=install2;package=Smfsimple-BrokenLinkList.zip;pid=0Errore del Database: Incorrect table name 'mionome.smf_boards'File: /home/mionome/public_html/Packages/temp/install_db.php
Riga: 58

Title: Re: Problema con mod similar topics
Post by: emanuele on January 04, 2013, 04:08:05 PM
Mi spiace, senza metterci mano non saprei cos'altro dirti...