buothz
-
Posts
50 -
Joined
-
Last visited
Posts posted by buothz
-
-
do you see any notice / hint in the PW logs?
- site/assets/logs/errors.txt
- site/assets/logs/exceptions.txt
- site/assets/logs/warnings.txt
errors.txt
Error Exception: Method JqueryCore::addComponents does not exist or is not callable in this context (in /home/rvocsizt/public_html/wire/core/Wire.php line 232) #0 /home/rvocsizt/public_html/wire/modules/Jquery/JqueryCore/JqueryCore.module(39): Wire->__call('addComponents', Array) #1 /home/rvocsizt/public_html/wire/modules/Jquery/JqueryCore/JqueryCore.module(39): JqueryCore->addComponents(Array) #2 /home/rvocsizt/public_html/wire/core/Modules.php(327): JqueryCore->__construct() #3 /home/rvocsizt/public_html/wire/core/admin.php(15): Modules->get('JqueryCore') #4 /home/rvocsizt/public_html/site/templates-admin/controller.php(13): require('/home/rvocsizt/...') #5 /home/rvocsizt/public_html/site/templates/admin.php(13): require('/home/rvocsizt/...') #6 /home/rvocsizt/public_html/wire/core/TemplateFile.php(92): require('/home/rvocsizt/...') #7 [internal function]: TemplateFile->___render() #8 /home/rvocsizt/public_html/wire/core/Wire.php(271): call_user_func_array(Array, Array) #9 /home/rvocsizt/public_html/wire/core/Wi2016-04-30 08:39:04 Error Exception: Method JqueryCore::addComponents does not exist or is not callable in this context (in /home/rvocsizt/public_html/wire/core/Wire.php line 232) #0 /home/rvocsizt/public_html/wire/modules/Jquery/JqueryCore/JqueryCore.module(39): Wire->__call('addComponents', Array) #1 /home/rvocsizt/public_html/wire/modules/Jquery/JqueryCore/JqueryCore.module(39): JqueryCore->addComponents(Array) #2 /home/rvocsizt/public_html/wire/core/Modules.php(327): JqueryCore->__construct() #3 /home/rvocsizt/public_html/wire/core/admin.php(15): Modules->get('JqueryCore') #4 /home/rvocsizt/public_html/site/templates-admin/controller.php(13): require('/home/rvocsizt/...') #5 /home/rvocsizt/public_html/site/templates/admin.php(13): require('/home/rvocsizt/...') #6 /home/rvocsizt/public_html/wire/core/TemplateFile.php(92): require('/home/rvocsizt/...') #7 [internal function]: TemplateFile->___render() #8 /home/rvocsizt/public_html/wire/core/Wire.php(271): call_user_func_array(Array, Array) #9 /home/rvocsizt/public_html/wire/core/Withanks -
Try looking at the Network tab (make sure it is open before you upload the image). You should end up with a line that has an error - that will be the PHP error that will give you the info to figure out what is wrong. The error you are seeing in the console is a syntax error because the ajax call is returning the real error.
My initial guess would be file/folder permissions, but if you let us know the error, we should be able to figure things out.
Hi, thank u for your help.
I've opened Chrome Network tab, I don't see any PHP error (debug true)
I see on network tab
removeClass@JqueryCore.js?v=162:16removeClass@JqueryUI.js?v=180:587(anonymous function)@main.js?v=2:31handle@JqueryCore.js?v=162:17F@JqueryCore.js?v=162:17handle@JqueryCore.js?v=162:17k@JqueryCore.js?v=162:16
and Chrome console
VM770:1 Uncaught SyntaxError: Unexpected token < in JSON at position 0parseJSON @ JqueryCore.js?v=162:16(anonymous function) @ InputfieldFile.js:171JqueryCore.js?v=162:18 'webkitRequestAnimationFrame' is vendor-specific. Please use the standard 'requestAnimationFrame' instead.What can I do? And the right write permission on what folder?Thanks. -
when I upload images on admin area bar remain to 100%
error: on chrome console
VM797:1 Uncaught SyntaxError: Unexpected token < in JSON at position 0parseJSON @ JqueryCore.js?v=162:16(anonymous function) @ InputfieldFile.js:171
With debug true: no errors on php
I have not updated anything and even touched or database files, how can i resolve?
Thanks
-
I'm going to do the porting to a new server for a site with processwire.
I wanted to know if I need to update the "userAuthSalt" in config.php and, if necessary, obtaining a new userAuthSalt.
Thank u.
-
In the demo site http://processwire.com/skyscrapers/ let's say for example that every skyscraper has its space, for example SunTrust Plaza want to manage page http://processwire.com/skyscrapers/cities/atlanta/suntrust-plaza/.
My question is: Is it possible that the various companies of skyscrapers can manage its own page with admin and password, clearly giving the fields pre-set?
If you can do, how can I structure the system? Using $ user and rules?
Thanks
-
1
-
-
I don't think so, but you can create one like this:
⊠ ABS
● Airbag↴
⊠ Airbag conducente
⊠ Airbag passegero
⊠ Airbag lateral
⊠ Anti-furto
...
for example, I create a father field, when I select the father field the system gives me the opportunity to choose their children, and so on...
In the admin panel sitename.com/processwire
thanks
-
In the admin area it's possible create a checklist tree like this?

thank u
-
These look like its a user select. Ids are in the range of admin etc. You should not choor title but name as the label as users dont have a title field.
If i've understand well what do u tell -> ids are of the template name
for example 29 is basic-page.php template etc...
I've the same problem for the fields, I can't see field's name but only id...

how can I resolve this problem?
-
I'm not sure I understand what you're trying to achieve, but let's try and fix a couple of little mistakes from the code
.
echo 'max n vake' . $maxn;
There's no variable named $maxn, there should probably read $maxi.
$field = $fields->get('$dati_auto[$i]');You're using single quotes so PHP treats what's between them as a literal string and does not interpolate the variable. As there's nothing more than a variable there, you can leave the single quotes off. To make PHP interpolate the variable, use double quotes as you've done at the very next line. The $language variable shown there is initialized to some meaningful value somewhere as well, right?
And yet another variable interpolation thing here:
echo "<li><strong>$label:</strong> $page->$dati_auto[$i]</li>";
Should be:
echo "<li><strong>$label:</strong> {$page->$dati_auto[$i]}</li>";(Ah, Pete was faster, so no hurry anymore for me. I'll go on a little more then.)
And of course you'd need fields called auto_marca, auto_tipo and auto_prezzo to exists in the template of this page for this to work in the first place. But I think you've covered that already.
One more thing, and this is just a preference, not a mistake at all. I like to iterate over that kind of array like this:
foreach($dati_auto as $field_name) { $field = $fields->get($field_name); // ... echo "... {$page->$field_name} ..."; }But as I said, there's nothing wrong with the way you've done it
.(Edit: Ngh.. The editor messed the code totally - had to fix them afterwards. I wanted to see if the post looks alright before posting it and used full editor for that (more options or whatever the button says there). Then submitted the post and code was all over the place...)
thank u to all! Problem resolved!
Another little question: why i can't see name of field but only id???

-
$dati_auto = array("auto_marca", "auto_tipo", "auto_prezzo"); $maxi = count($dati_auto); echo 'max n vale' . $maxn; for ($i = 0; $i < $maxi; $i++) { //echo '<p>dati auto vale ' . $dati_auto[$i].'</p>'; $field = $fields->get('$dati_auto[$i]'); $label = $field->get("label$language"); echo "<li><strong>$label:</strong> $page->$dati_auto[$i]</li>"; }why this code don't work?
There's a method to take an array with my vars and put in a cycle?
Thank u

-
I've this output
<li class='Inputfield InputfieldSelect Inputfield_auto_marca ui-widget InputfieldStateRequired' id='wrap_Inputfield_auto_marca'> <label class='ui-widget-header' for='Inputfield_auto_marca'>Marca</label> <div class='ui-widget-content'> <p class='description'>Marca</p> <select id="Inputfield_auto_marca" class="required" name="auto_marca"> <option selected='selected' value=''></option> <option value='fiat'></option> <option value='bmw'></option> </select> </div> </li>
why <option value='fiat'></option> and not <option value='fiat'>fiat</option>... I've not change files of your module... where's the problem? thanks
EDIT -> corrected file InputfieldSelect.module
your version
$out .= "\n\t<option$selected $attrs value='" . htmlspecialchars($value, ENT_QUOTES, "UTF-8") . "'>" . $this->entityEncode($label) . "</option>";
my version
$out .= "\n\t<option$selected $attrs value='" . htmlspecialchars($value, ENT_QUOTES, "UTF-8") . "'>" . htmlspecialchars($value, ENT_QUOTES, "UTF-8") . "</option>";
why this error? Can be a server problem with "$this->entityEncode($label)"?
-
Is it possible to replicate a field in a template?
Let me give an example.
1) I create a field named "article" (textarea multi language)
2) I insert the field "article" in a new template "page news"
3) I create a new page with the template "page news"
4) I enter my body, title, and ...
5) I want to put 3 fields "article", another page in 5 fields "articles", in another 20 fields "article" and so on ... using the same template.
there is a method?
FIND NOW -> http://processwire.com/api/fieldtypes/repeaters/

Thank u...
-
1
-
-
I need to create an admin area where the admin processwire can enter data (create several new account username and password) in the mysql database.
Once he has created access data, it can associate the access to different pages that are created by the admin panel
for example
admin create
user: creative
pass: madolo
user log as
user: creative
pass: madolo
and can display www.sitename.com/page1 that other users can't show...
admin create
user: pomodoro
pass: rosso
user log as
user: pomodoro
pass: rosso
and can display www.sitename.com/page77 that other users can't show...
and so on ...
As you suggested me to do?
-
The default precision value is 0. I can update this to assume no precision value until it is specifically set ... I think this makes sense--thanks.
The precision field is for rounding, not formatting. I think what you want is number_format(). You could do this in your output:
$value = number_format($page->float_value, 2);
I could add this formatting in as a configuration option with FieldtypeFloat too, but once formatted, the value is a string, not a float. And I'm not sure it's wise for us to have this Fieldtype returning strings rather than floats.
There are also localization considerations with number formatting (decimal type and thousands separator), which are also the job of number_format.
perfect, resolved with
$value = number_format($page->float_value, 2);

u're a genius!

-
General question about processwire, when I create a float field and insert data system truncates the decimal point, and this is not obvious if I type the numbers 2.090000 ...
But if I want to:
- 2 exact decimal (eg 2.40 / 69.70 -> now instead of 2.4 / 69.7)
- And always keep at least 2 decimal places (eg 2,00 / 69,00 -> instead I out 2/69)
where can I do? I can choose how many decimal places to round off the menu (in fact, I put 2), but I would like to, just for the field, keep the zeros and rounding to 2 decimal places ...
Thanks in advance.
-
You could certainly set your homepage template to redirect to that URL when the homepage is accessed without a language GET variable. But I think it would be much better to just assume that your 'default' language is 'it'. There is no rule that the default language has to be English or anything else. The only rule is that it just has to be named 'default' (in the admin), but it is there to represent whatever you want your default language to be. In your case, it sounds like you want your default language to be 'it' since you are wanting an access to /index.php to instead go to /index.php?language=it. So the proper way to do this is to use the default language as its intended. But if you are still wanting to do exactly what you asked, you would do this in your homepage template:
if(!$input->get->language) $session->redirect($page->url . '?language=it');
thank u a lot to all people...
the last problem: I've just made this function on my mind but when I pass to ?language=en and I click another link in the menu return "currentpage?language=it" and system lost the change of the language
:'( -
I don't really understand any or all off what you wrote in this thread. Impossible to help.
Anyway. Are you aware that if a text isn't translated it will output the default language text instead? Just in case you maybe experience this and think it's wrong.
Sry my eng is bad

"The perfect solution it would be change index.php to http://MYURL/?language=it, is possibile? I've tried with .htacces and my server conf but I do not know it..." Now when visit my site guest go to http://MYURL/index.php, it is possible make default url http://MYURL/?language=it?
Thanks...
-
I don't think that your code above will work because you are setting session values in the middle of output. Everything that you do with regard to getting/setting language needs to happen before you start outputting stuff. You'd do it like this:
<?php if($input->get->language) { $name = $sanitizer->pageName($input->get->language); $language = $languages->get($name); if($language->id) { $session->languageName = $language->name; $user->language = $language; } } else if($session->languageName) { $user->language = $languages->get($session->languageName); } ?> <html> <head> ...I'm putting that <html> tag there just to show that you need to take care of the language getting/setting stuff before you start sending markup. More likely you would include('./head.inc'); or something like that.
thank u for all the help, i've tried this version on the first row of head.inc but nothing to do... if i set in "processwire/access/users/edit/?id=..." not default language system don't go.
If i return with my old code (move to the start or head.inc) and I click my language flag icon
if ($session->language == 'it') { echo '<li><a href="./?language=en"><img src="/img/gb.png" alt="English Language"></a></li>'; ...that do
if($input->get->language) { // user clicked on a link to set the language $name = $sanitizer->pageName($input->get->language); $language = $languages->get($name); if($language) $session->language = $language->name; }system go ALL ok!!!
When i chage user guest and admin I see:
... Change: unset:tariffe Change: unset:title Change: unset:trasmissione Change: language Saved Page: /processwire/access/users/nissim/
gived to me when I change access -> user -> admin -> language?
The perfect solution it would be change index.php to http://MYURL/?language=it, is possibile? I've tried with .htacces and my server conf but I do not know it...
-
This looks like it should work to me. Just make sure you are executing all of this before you are starting output. If you find it's still not working, examine what values are getting thrown around in there. For instance,
if($session->language) { echo "<p>Language is: $session->language</p>"; }Likewise, make sure that the names like 'it' are consistent with the actual page name of the language.
thank u but i've tried all methods and nothing to do...
If i change user language admin or guest (1010 = it | 1080 = eng/default) to 1010 system make this problem:
- part of the text it's ok
- part of the text remain default while I press this button
if ($session->language == 'it') { //italiano echo '<li><a href="./?language=en"><img src="/img/gb.png" alt="English Language"></a></li>'; } else { echo '<li><a href="./?language=it"><img src="/img/it.png" alt="Italian Language"></a></li>'; }when I click the flag (made by me) it's all ok...
first
echo "User Language: ".$user->language; echo "Session Language: ".$session->language; echo "Language: ".$language; echo "Language name: ".$language->name;
are ALL blank (null i think...) exept $user->language, 1008 if i set default and 1010 if i set it...
If i don't change admin/guest lang (1008 -> default) are all blank but system go... problem it that the only info that system has is "$user->language = 1010" and nothing other... session remain = null! language = null!
If i leave $user->language = 1008 all is ok, if $user->language = 1008 problem is while I press my lang flag and start
if($input->get->language) { $name = $sanitizer->pageName($input->get->language); $language = $languages->get($name); if($language) $session->language = $language->name; }I'm becoming crazy!!!
ALL PAGE LANG CODE
<?php echo "User Language: ".$user->language; echo "Session Language: ".$session->language; echo "Language: ".$language; echo "Language name: ".$language->name; /*if ( $user->language == '1008') { //$language = 'it'; $session->language = 'it'; }*/ /*if ( $user->language == '1010') { //$language = 'it'; $session->language = 'it'; }*/ /*if($session->language) { echo " Language is: $session->language "; }*/ //echo $session->language; /** ?><ul id='topnav'><?php // LANGUAGES //$language = '1008'; //IT //$language = '1008'; //EN //$language = ''; //$user->language = $languages->get('it'); //soluzione proposta if($input->get->language) { // user clicked on a link to set the language $name = $sanitizer->pageName($input->get->language); //echo 'name: '.$name; $language = $languages->get($name); //echo 'lang: '.$language; if($language) $session->language = $language->name; /*echo 'lang name: '.$language->name; echo "User Language: ".$user->language; echo "CLICK!!!"; echo "Session Language: ".$session->language; echo "Language: ".$language; echo "Language name: ".$language->name;*/ //$user->language = $languages->get($session->language); } if($session->language) { // language is defined in user's session $user->language = $languages->get($session->language); $language = $languages->get($session->language); /*echo "SESSION!!!"; echo "User Language: ".$user->language; echo "Session Language: ".$session->language; echo "Language: ".$language; echo "Language name: ".$language->name;*/ //if($session) $language->name = $session->language; //$user->language = $languages->get($session->language); } //LANGUAGES END /*if ($session->language == 'it') { $language = 'it'; echo "if session-lang".$language; } else { $language = ''; echo "if session-lang".$language; }*/ ... </ul>... -
$user->language = $languages->get('de');$user->language = $languages->get('de');does not solve the problem, I just change some of the text while the controlled with
if ($session->language == 'it') {...remains in the default language (eng).
// LANGUAGES //$language = ''; $user->language = $languages->get('it'); //OK! Only a part become not default lang... if($input->get->language) { // user clicked on a link to set the language $name = $sanitizer->pageName($input->get->language); $language = $languages->get($name); if($language) $session->language = $language->name; //$user->language = $languages->get($session->language); } if($session->language) { // language is defined in user's session $user->language = $languages->get($session->language); $language = $languages->get($session->language); //if($session) $language->name = $session->language; //$user->language = $languages->get($session->language); } //LANGUAGES ENDwhere's the problem?
thank u in advice...
-
I've already problem with multilanguages...
I wanna start with a NON default lang...
it is possibile define $session->language == 'myvar' at start?ù
When I click to eng language become default?
$language = ''; if($input->get->language) { // user clicked on a link to set the language $name = $sanitizer->pageName($input->get->language); $language = $languages->get($name); if($language) $session->language = $language->name; } if($session->language) { // language is defined in user's session $user->language = $languages->get($session->language); $language = $languages->get($session->language); ...If I change processwire/access/users/edit/ default to mylang, language system don't work...
thank u...
-
soundas pdfcompsar have.meinor problemo
yo.must edit /site/config.php, changes
$config->debug=true;
to $config->debug=false;
resolved with debug off and pdfcomposer uninstall... thank u!
-
Hi, i've changes server, linux to linux, but i have a problem...
- i have reload all files from old server
- i have reload all db from old server
- i have configurated only file ../site/config.php to new database user, pass...
site is ok but when i go to mysite.com/processwire
give to me this errore (debug: true):
Strict Standards: Declaration of Pdfcomposer::___execute() should be compatible with that of Process::___execute() in /htdocs/public/www/site/modules/Pdfcomposer.module on line 3 Warning: Cannot modify header information - headers already sent by (output started at /htdocs/public/www/site/modules/Pdfcomposer.module:3) in /htdocs/public/www/wire/core/Session.php on line 272 Warning: Cannot modify header information - headers already sent by (output started at /htdocs/public/www/site/modules/Pdfcomposer.module:3) in /htdocs/public/www/wire/core/Session.php on line 273 Warning: Cannot modify header information - headers already sent by (output started at /htdocs/public/www/site/modules/Pdfcomposer.module:3) in /htdocs/public/www/wire/core/Session.php on line 274
but i don't see the site admin panel, a blank page with only the error.. where is the error?
-
RESOLVED: DISK QUOTA EXCETED... My low cost server...


Problem uploading images
in General Support
Posted
resolved