
Faisal
-
Posts
70 -
Joined
-
Last visited
Posts posted by Faisal
-
-
20 hours ago, bernhard said:
are you uploading huge images? maybe you find some helpful information in the console log and in pw's log folder?
Yes, sorry for my last test I upload 2 images (5KB
and 719KB) only the 5KB is uploaded but a 719KB is not
I have also try PW 3.x on the same server but it's the same issue.
I uploaded the same image 719 KB to another PW 2.x/3.x on other servers and no problem
szabesz I will send this formula to the website owner to send to server support to apply
I will update this asap
Thank you All
-
1
-
-
Hi,
I installed PW 2.8.62 On a cPanel / Safe mode ON / PHP 5.3.29 / MYSQL 5.5.57-cll
I hade an error message regarding safe mode with the fix of adding a temp folder and config edit. (done)
But most of the time images upload just stuck at 100%
More info I think may be useful
max_execution_time = 30
max_file_uploads = 20
memory_limit = 512 M
post_max_size = 128 MFrom the search, I found that I need to edit post_max_size to be equal to memory_limit but I am not sure!
Can you help me, please
Thank you.
-
Hi all,
In a default multi language install when I add a TextLanguage or a TextareaLanguage fields and make it required, only default language will be required in the add page form which it is fine.
But is there any way I can make some of the fields required for all languages in some templates?
-
I think I need to have "Default language homepage URL is same as root URL?" set to "no" in /admin/module/edit?name=LanguageSupportPageNames
so that home link go to domain.com/en insted of domain.com/ when looping home children in navbar etc...
Now I am trying to find out how to make domain.com/ show splash page content rather than the default content
in my _out.php Append template file
$pageindexurl = $_SERVER[HTTP_HOST].$_SERVER[REQUEST_URI]; if ($pageindexurl == "/") { include_once("./_layoutspalsh.php"); // layout for splash page } else { include_once("./_layouthtml.php"); // default layout for home/lang* and all other pages }
But domain.com is redirecting to domain.com/en before anything else
-
21 minutes ago, tpr said:
I guess you need to set "Yes" in "Default language homepage URL is same as root URL?" here:
/admin/module/edit?name=LanguageSupportPageNames
Plus adjust the Home page's url at its Settings tab (enter "en").
Then examine the url in your home template file and if it's only "domain.com" (without "/en") then show the welcome page.
Thank you @tpr
I have the settings exactly as you said in the first place.
-
Hi all,
I have this website project with multi-language support: English is the default language and Arabic as a secondary language.
The installed language modules are: (Languages Support, Languages Support - Fields, and Languages Support - Page Names)
Homepage settings: page name: "en" for English and "ar" for Arabic.
So the current links are:
domain.com/en is redirecting to domain.com/ for English
And domain/ar for Arabic
But the project owner want's to do these changes:
domain.com/ act as a splash page (have website logo and language select) only.
domain.com/en the English version (and make the home link go to domain.com/en insted of domain.com/) when looping the nave tree for example:
echo renderTopNav($homepage->children->prepend($homepage));
domain.com/ar the Arabic version
I try to bypass the redirect but I failed to do anything about it.
Any help or notes making this happen is highly appreciated,
Thank you.
-
You can also checkout the site-languages profile included with ProcessWire as a quick startup and example.
-
Hi @Junaid Farooqui, and thank you @adrian.
Till now there isn't an Arabic language pack for processwire.
I have fully translate and helped translating some web applications in the past (private and public projects). sometime for apps that I didn't even like
But why I didn't start making an Arabic language pack for processwire till now? (and I am in deep love with processwire)
I am not going to say I didn't get the time to do it just yet or something like that, even it's true.
It is because of Mr.Ryan, He made it so easy and simple to have a localize your admin area even if you don't have a language pack (this man is not just a normal programmer or developer) he is a magician
I made a small website for someone don't understand English and he don't need/want full accesses to admin so I just install language module in the core and translate whatever he needed only and everybody is happy
I have a plan to make an Arabic language pack but I can't tell any estimate time for it but that just me.
However, if you need any help I will be happy to assist.
And sorry for my bad English expression.
-
2
-
-
Hi all,
I make a website using PW for one of my friends/clients and I using the template file method by Ryan to make the XML sitemap.
The website is multi-language (English is default) so when I give him the sitemap links for every language he ask me why is the http://www.domain.com/sitemap.xml have the same content as http://www.domain.com/en/sitemap.xml
and ask me if it possible to use only one site map file that content/linked to all other sitemaps so I make some changes so that http://www.domain.com/sitemap.xml will output:
<?xml version="1.0" encoding="UTF-8"?> <sitemapindex xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"> <sitemap> <loc>http://www.domain.com/en/sitemap.xml</loc> </sitemap> <sitemap> <loc>http://www.domain.com/sublang/sitemap.xml</loc> </sitemap> </sitemapindex>
So I change:
echo renderSitemapXML();
In to:
$mapindexurl = $_SERVER[HTTP_HOST].$_SERVER[REQUEST_URI]; if ($mapindexurl == $_SERVER[HTTP_HOST]."/sitemap.xml") { //echo renderSitemapindexXML(); I tried to move the code below to a function but the language loop did not output anything echo '<?xml version="1.0" encoding="UTF-8"?>' . "\n" . '<sitemapindex xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">'; foreach($languages as $language) { if(!$page->viewable($language)) continue; // is page viewable in this language? $url = $page->localUrl($language); echo "\n<sitemap>" . "\n\t<loc>http://" . $_SERVER[HTTP_HOST]. $url . "</loc>" . "\n</sitemap>"; } echo "\n</sitemapindex>"; } else { echo renderSitemapXML(); }
Its working fine and I hope this is useful to someone if the code is OK
I also hope if someone can review it since I am not a code writer
Thank you
-
Oops!
Thank you it is working now$content = "<h1>".$page->title."</h1>"; $content .= $page->body; if(count($page->files)) { $attachments = ""; foreach($page->files as $file) { $attachments .= "<a href='$file->url'>$file->name</a><br>"; } } else { $attachments .= "No Files!"; } $content .= $attachments;
-
Hi
I have pages with multi attachment
I have field type file with the name files and the Formatted value is Automatic
my template file code
$content = "<h1>".$page->title."</h1>"; $content .= $page->body; if(count($page->files)) { foreach($page->files as $file) { $attachments = "<a href='$file->url'>$file->name</a><br>"; } } else { $attachments = "No Files!"; } $content .= $attachments;
The problem is it only show one file even if there are more than one!
-
OK it didn't work this way but I find this https://processwire.com/talk/topic/2089-create-simple-forms-using-api/
And https://processwire.com/talk/topic/4788-creating-pages-via-api-but-show-error-when-duplicate/
test and working great
$out = ''; $form = $modules->get("InputfieldForm"); $form->action = "./"; $form->method = "post"; $form->attr("id+name",'family-form'); $field = $modules->get("InputfieldText"); $field->label = "Name 1"; $field->attr('id+name','family_firstname'); $field->required = 1; $form->append($field); // append the field $field = $modules->get("InputfieldText"); $field->label = "Name 2"; $field->attr('id+name','family_secondname'); $field->required = 1; $form->append($field); // append the field $submit = $modules->get("InputfieldSubmit"); $submit->attr("value","Subscribe"); $submit->attr("id+name","submit"); $form->append($submit); if($input->post->submit) { $form->processInput($input->post); if($form->getErrors()) { $out .= $form->render(); }else{ $p = new Page(); $p->template = 'family-form'; $p->parent = wire('pages')->get('/family/'); $p->name = date('y-m-d-H-i-s-u'); $p->title = $form->get("family_firstname")->value." - ".$form->get("family_secondname")->value; $p->family_firstname = $form->get("family_firstname")->value; $p->family_secondname = $form->get("family_secondname")->value; $p->save(); $out .= "<p>You submission was completed! Thanks for your time."; } } else { // render out form without processing $out .= $form->render(); } echo $out;
very beautiful-
2
-
-
Hi all
Can I override some values in FormTemplateProcessor?
This is one of my forms and it works fine.
$form = $modules->get('FormTemplateProcessor'); $form->template = $templates->get('family-form'); // required $form->requiredFields = array( 'family_firstname', 'family_secondname', 'family_thirdname', 'family_familyname', 'family_email', 'family_city', 'family_job', 'family_mobile' ); // $form->email = 'your@email.com'; // optional, sends form as email $form->parent = $page; // optional, saves form as page echo echo $form->render(); // draw form or process submitted form
when add new page:
Can I use (family_firstname family_secondname family_thirdname family_familyname) in page title instead of date?
Can I change the default success message?
Can I change the Submit button value? for example "Add your info"
Thanks
-
Any body have an explanation
If somehow you are dealing with ioncube, then this was not a PW related issue. Glad you finally got it working.
Yes, it's not PW related issue. that's what was driving me crazy!!! and I knew that since day 1 of this problem.
And I don't like just fixing the problem, I always like to know what and why cause this and that.
By the way I didn't figure it out the solution my self.
I google the Chrome error message and all I can find is:
1- This is an Apache related issue.
2- Some people say to install gdp for debug Apache and here is one of them http://sysadmin.carlusgg.com/?p=197
3- Some people say disable all PHP extensions, if the error is disappear, enable theme one by one until you find the one causing this.
Since I have only have ioncube and zend only,
I try my luck with ioncube and zend and it's worked for me so I post my experience with it here so it may be helpful to somebody else.
Thank you all.
-
OK, I don't know if this is the fix but this what happend
I comment the zend extensions at the end of php.ini file
./build ioncube
./build zend
restart Apache
(same problem)
Then
I comment the zend extensions again at the end of php.ini file
Delete both ZendGuardLoader.so and ioncube_loader_lin_5.3.so files
./build ioncube
./build zend
restart Apache
(it works)
Any body have an explanation or should I mark this as Solved
-
In Apache Error Log I got
[notice] child pid xxxxx exit signal Segmentation fault (11)
every time I visit homepage or admin page after uploading PW 2.5 upgrade files.
xxxxx = random number
-
I read this before, not helping.
I am now comparing both server configuration and I see thy are almost identical, unless I am missing something.
-
No, I see it still beta, and the upgrade steps are very easy.
And by the way there are no any 3rd party modules installed in any of the websites.
-
Yes, I did that
I also try to use old .htaccess just to check if the new one is making this problem but it seems not.
-
Hi all
I have website A (ProcessWire 2.4.0) in server A (Dedicated Servers)
And
I have website B (ProcessWire 2.4.0) in server B (VPS)
Both websites are multi-language using (Languages Support, Languages Support - Fields and Languages Support - Page Names) modules.
Both servers are:
Apache 2.2.25
MySQL 5.5.31
Php 5.3.27I want to upgrade website A to (ProcessWire 2.5.x) I get massage from browser after uploading wire folder, htaccess and index file
I get browser error and nothing else.
I get in FireFox:
The connection was reset
The connection to the server was reset while the page was loading.
The site could be temporarily unavailable or too busy. Try again in a few moments.
If you are unable to load any pages, check your computer's network connection.
If your computer or network is protected by a firewall or proxy, make sure that Firefox is permitted to access the Web.And from Chrome:
No data received
ReloadHide details
Unable to load the webpage because the server sent no data.
Error code: ERR_EMPTY_RESPONSETests:
- I copy website B to server A and try to upgrade (same problem)
- I copy website A to server B and try to upgrade (it works)
- I copy website A to localhost and try to upgrade (it works)
- If upload website A from localhost after upgrade (it works)
- I upgrade website B in server B (it works)
- I Install PW 2.5 in server A, if choose "site-languages" profile (same problem) install not continue after select languages profile
- I Install PW 2.5 in server A "site-blank" profile then install (Languages Support, Languages Support - Fields and Languages Support - Page Names) modules. and start adding some test Language fileds (it works)
Thanks in advance
-
OK, I have some new info
The website was developed under sup folder http://www.fh.sa/pw/
If I move all the files back to pw folder the problem is gone.
If I move all the files back to root folder the problem is back.
I delete all files in site/assets/cache and site/assets/sessions and change the sessionName in config file but it's the same problem!
What is driving me crazy is that it happen in one page only
-
No, but I used the own or the same template for my websites page. It have only body and repeater
the link in footer
<a class="footer-link" href="<?php echo $homepage->url; ?>site-info/"><?php $credit = $pages->get("/site-info/"); echo $credit->title; ?></a>
But the problem in the language link and only for one language!
I update the language switcher cod is 100% the same here
Now it show the Arabic title but the link always to default language! -
Hi all
I really don't know how to describe this.
Its PW 2.4 Multi-Language website with "Languages Support", "Languages Support - Fields" and "Languages Support - Page Names"
The problem is only in the "Site Info" English page
The Arabic link dose not link to http://www.fh.sa/arabic/site-info/
* And the Arabic is active in the page setting tab.
Any ideas?
-
Yes, that's nice
If you are having a long list of "RTL" languages you will need more effective solution, so it's fair having one new field in database.
I don't want to go advance because it's not just rtl for multi languages, some languages need special font-family, font-size and so on....
I am working in website at this time that have global field "custom_css" so evrey page can have additional css file for some special effects if needed so I don't have to load all css in a page that don't use it.
This can also be used for multi languages if needed.
Thank you for sharing your idea, and I hope others do so if they have any ideas with some code samples because there are people are not code writers who do not know some of the technical terms, but they can do will just from an example or a source code-
2
-
Problem uploading images stuck at 100%
in General Support
Posted
yes indeed! its just I did it earlier but forget to mention it