-
Posts
140 -
Joined
-
Last visited
Everything posted by Mackski
-
While I understand this is not ideal, it's the only way to get things to work with wiremail on the servers in question. Other than sending plain text emails, or using a third party mail library.
-
I only replaced \r\n with PHP_EOL in the core. I now have now come across this in two cases, where thunderbird in particular, will not display HTML email, UNLESS I use the above mentioned code. This goes for 2.7 > I'm guessing it's a delivery / configuration issues, but why it doesnt work with \r\n I do not know. Strangley localhost sends correctly, comparing email sources, I can see the production server is adding additional returns: Local: X-Mailer: ProcessWire/WireMail MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="==Multipart_Boundary_x971272fd25f1cf0be14fb1604bb269eax" Message-Id: <20170705010932.9296B41846@localhost.localdomain> Date: Wed, 5 Jul 2017 11:09:32 +1000 (AEST) Production: X-Mailer: ProcessWire/WireMail MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="==Multipart_Boundary_xc4dc56a7cc1f6fe4eadc7f63e3e9f458x" Message-Id: <20170704234256.C3CA113208EC@XXX.XXX.com.au> Date: Wed, 5 Jul 2017 09:42:56 +1000 (AEST) Could be more sinister, gmail displays the HTML as: So it might be the way I'm reading the file? ie: wireRenderFile('path/to/email/template'); <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.= w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">=0A<html xmlns=3D"http://www.= w3.org/1999/xhtml">=0A<head>=0A<meta name=3D"viewport" content=3D"width=3Dd= evice-width" />=0A<meta http-equiv=3D"Content-Type" content=3D"text/html; c= harset=3DUTF-8" />=0A<style>=0A/* -------------------------------------=0A = GLOBAL=0A------------------------------------- */=0A* {=0A margin: 0;= =0A padding: 0;=0A font-family: "Helvetica Neue", "Helvetica", Helvetica,=
-
Problem: I've created a page table on a parent with existing children, however PW is not prompting to add existing pages to the table. I'm sure it did this in previous versions, unless I'm missing something?
-
Undefined variable: PW 3 + wireRenderFile + Use Compiled File?
Mackski replied to szabesz's topic in API & Templates
Regular include doesn't work. I get an error because I'm using wireRenderFile inside my included file: Call to undefined function wireRenderFile() This used to work on 2.7 so not sure what's changed. -
Undefined variable: PW 3 + wireRenderFile + Use Compiled File?
Mackski replied to szabesz's topic in API & Templates
Ok, so I'm still having some issues: wireIncludeFile($file, $data); Inside the $file, I'm setting up some variables, but they don't appear to be set in the current scope. ie: wireIncludeFile($file, $data); echo $test; Where $test = "test"; inside $file; If it's a regular include, shouldn't these variables be available after the wireIncludeFile function? -
Undefined variable: PW 3 + wireRenderFile + Use Compiled File?
Mackski replied to szabesz's topic in API & Templates
After upgrading from 2.7.2 > 3.0.61 i now receive this error: Call to undefined function wireRenderFile() Looks like an issue with including files and the compiler? ui.php includes _init.php - works ui.php includes _init.php which includes file2.php - does not work within file2 This previously worked with 2.7.2 [SOLVED] - I moved my _init.php file from the main ui.php template, and used $config->prependTemplateFile = '_init.php'; which has resolved the issue. Still curious as to why this worked before upgrading. -
This is what I have done, the problem is, the custom page label format does not display in the select dropdown. Am I missing something previously stated? EDIT: You are right Robin S, thanks for the clarification it was a typo on my behalf. Now working as expected. (Yes I feel stupid)
-
Let me clarify, in the select aka dropdown, i would expect to see the custom format as per page tree.
-
Just wondering why the custom format is not applied to select options for page reference fields. Is there an easy way to hook and make it possible? Here are the appropriate (offending) template fields:
-
Module: AIOM+ (All In One Minify) for CSS, LESS, JS and HTML
Mackski replied to David Karich's topic in Modules/Plugins
I just found a collision cache file naming issue if all files have the same modified timestamp regardless of the array contents. Simple fix to ensure the filename itself is included in the MD5($_timestamp) $_timestamp = ($_timestamp + $file['last_modified'] . basename($file['absolute_path'])); https://github.com/FlipZoomMedia/ProcessWire-AIOM-All-In-One-Minify/issues/64 -
I've had problems sending HTML email. It appears some php configurations don't like \r\n (*nix). This has come up on more than one occasion on dedicated hosting environments. I've had to modify WireMail.php to send HTML email correctly. if($this->bodyHTML) { if(!strlen($text)) $text = strip_tags($html); $boundary = "==Multipart_Boundary_x" . md5(time()) . "x"; $header .= PHP_EOL."MIME-Version: 1.0"; $header .= PHP_EOL."Content-Type: multipart/alternative; ".PHP_EOL." boundary=\"$boundary\""; $body = "This is a multi-part message in MIME format." .PHP_EOL.PHP_EOL. "--$boundary" . PHP_EOL . "Content-Type: text/plain; charset=\"utf-8\"" .PHP_EOL . "Content-Transfer-Encoding: 7bit" .PHP_EOL.PHP_EOL. "$text" .PHP_EOL.PHP_EOL. "--$boundary". PHP_EOL . "Content-Type: text/html; charset=\"utf-8\"".PHP_EOL . "Content-Transfer-Encoding: 7bit".PHP_EOL.PHP_EOL . "$html" .PHP_EOL.PHP_EOL . "--$boundary--". PHP_EOL; } else { $header .= PHP_EOL."Content-Type: text/plain; charset=\"utf-8\""; $body = $text; }
-
I'm trying to add a hook to allow exporting of filtered users from /access/users I have managed to add a button to a user form to export all users, however it would be much nicer to add a button to allow export from a filtered list of users, right after the page lister. I've tried: $this->addHookAfter("ProcessPageLister::execute", $this, "addExportUsersButton"); with no real luck. Any ideas? Here is where I'm trying to add a export button after:
-
I'm not sure why I didn't try this, I just assumed PW would just order them by ID, however this is not the case. This also makes sense when adding new options in order with new ID's. Problem solved.
-
I have options defined that I want to sort before display in admin. The options are displayed as checkboxes, or AsmSelect depending on how I feel Alphanumeric eg: 1=remoteGarage 2=secureParking 3=study 4=dishwasher 5=builtInRobes 6=gym Sorted for display: 5=buildInRobes 4=dishwasher 6=gym 1=remoteGarage 2=secureParking 3=study
-
Yes that was the issue however shouldn't I get an exception?
-
This one looks like a bug, I have no idea how it's occurring. PW is somehow managing to update the page status to 131073 from totally nu-related code: $payment = $pages->get('template=payment,id='.$payment_id); if($payment->id) $payment->payment_status = P_PAID; $payment->of(false); $payment->save();
-
I have many pages with multiple Page fieldtypes. What I'm looking at doing is caching the related pages, however I cannot obtain ID references via $page->getArray(). I only get [title] returned. Is there a way to return Page typefield field ID references to other pages without hitting the DB?
-
Latest Chrome on PC.
-
Yes for this one call the headers are striped but I have no idea why or where this is happening.
-
No, I was just showing the line of code which appears to not work.
-
The client is actually accessing my local server. I've tested with some other clients who don't see this issue. Strangly it's only happening in one page. My Ajax call is sent to a different URL within the project. The same call is also being used elsewhere without issue.
-
$config->ajax is being set locally, however the exact same call for my client it is not. The request for my client is rather long, 25 seconds. However, I'm stumped as to why, this should not affect this code: $config->ajax = (isset($_SERVER['HTTP_X_REQUESTED_WITH']) && $_SERVER['HTTP_X_REQUESTED_WITH'] == 'XMLHttpRequest'); If I remove the if($config->ajax) from my ajax function, everything works as expected. Headers sent look correct: Accept:application/json, text/javascript, */*; q=0.01 Accept-Encoding:gzip, deflate, sdch Accept-Language:en-US,en;q=0.8 Connection:keep-alive Cookie:wire=vg8bth2bcv2c8gq58nbbfean61; wire_challenge=nVbLGO0aHzCu%2FMO9ekc4t.N6ol.xf8s5 Host:** Referer:http://*** User-Agent:Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.87 Safari/537.36 X-Requested-With:XMLHttpRequest
-
I still get an error/warning, which doesnt seem to effect anything so far: You must assign a template to the page before setting custom field values (title__data) [pageClass=Page, template=]
-
That did the trick, the ID's were different in the serialized data. I changed them and they now work. Now to just restoring template settings and permissions. Thanks for you help Adrian!
-
For the most part I've restored my templates, except repeaters seem to be broken. Not showing fields. Also the system seems to be re-adding repeaters in the templates table; eg: repeater_draw_nomination_repeater1 If I delete this entry, the next page refresh will add: repeater_draw_nomination_repeater2