heldercervantes

Members
  • Content count

    141
  • Joined

  • Last visited

  • Days Won

    1

heldercervantes last won the day on July 26 2016

heldercervantes had the most liked content!

Community Reputation

153 Excellent

About heldercervantes

  • Rank
    Sr. Member

Contact Methods

  • Website URL
    http://heldercervantes.com

Profile Information

  • Gender
    Male
  • Location
    Porto, Portugal

Recent Profile Visitors

1,762 profile views
  1. @rick Something more must be going on. At that point in scrolling JS collapses the header, adds color to the logo and gives it a white background. You may have stumbled upon a JS issue in Ubuntu.
  2. Hey forum. I should have posted this one here a long time ago, but been so busy I didn't even add it to my portfolio despite being launched months ago: http://www.wholebrain-technologies.dk Wholebrain is a brainwave optimization center in Denmark. This started out as a site redesign and quickly shifted towards a complete brand overhaul with new logo, illustrations, icons, the works. The site features a simple ingredients list: Repeater, AIOM, Markup SEO and that's about it. I took a flexible approach where the basic page template features a bunch of optionals that can be combined to add testimonials, video gallery, featured video, illustration or icon cards. You can see the result navigating from page to page, as all use the same template, except for the contacts page. In the end, this site was replicated for Dynamic Brain Technologies, the same service in Ireland: http://www.dynamicbraintech.com Enjoy, H
  3. I've asked them to turn it off. Works for now, but I'll have to keep it in mind for future projects. HTML content in textareas are causing a false positive on an injection checker. We'll probably see more people with the same problem. The only solution I can think of would mean encoding post content when PW saves.
  4. Hey guys. It's the second time I've collided with this problem recently. Saving a page in PW jumps to a 404 page, and nothing is saved. The problem is having html in a textfield. My first incident was with a plain textarea (no CK), where the admin was supposed to enter an instagram embed code. Got around that one easily by switching to a text field, user enters only the ID instead of the embed code, and the template would process that. Now it happened again on another project and this time I can't work around it the same way. It's a CK editor field, and when an image is added to the text, poof! My hosting provider tells me something is colliding with Firewall: XSS Filter - Category 1: Script Tag Vector rule and sent me the following log: http_method POST action_desc Access denied with code 403 (phase 2). ip ---.---.---.- meta_severity CRITICAL meta_id 212000 path /processwire/page/edit/?id=1788 meta_logdata Matched Data: <script async defer src=\x22//platform.instagram.com/en_US/embeds.js\x22></script> found within MATCHED_VAR: <blockquote class=\x22instagram-media\x22 data-instgrm-captioned data-instgrm-version=\x227\x22 style=\x22 background:#FFF; border:0; border-radius:3px; box-shadow:0 0 1px 0 rgba(0,0,0,0.5),0 1px 10px 0 rgba(0,0,0,0.15); margin: 1px; max-width:658px; padding:0; width:99.375%; width:-webkit-calc(100% - 2px); width:calc(100% - 2px);\x22><div style=\x22padding:8px;\x22> <div style=\x22 ... meta_uri timestamp 2017-05-02 15:46:39 meta_offset 0 meta_msg XSS Filter - Category 1: Script Tag Vector||www.-----.com|F|2 http_version HTTP/1.1 host www.-----.com justification Match of "contains google_ad" against "MATCHED_VAR" required. Has anyone hit this problem? Is there a solution on PW's side that doesn't require lowering this rule on the server? Thx, H
  5. Thanks Robin. It is a shared host and I'll ask them if this was the case. Some server change seems the only reasonable explanation.
  6. Hi guys, I have a website that's been running for about a year, and now it started crashing PW when I save a page, showing the 404 page after saving and doesn't actually save anything. Testing things out I've pinpointed the problem. I have a repeater field for placing instagram embed code, and adding content to just one entry is enough for the page to not save. It's a simple textfield and I'm pasting a standard embed code: <blockquote class="instagram-media" data-instgrm-captioned data-instgrm-version="7" style=" background:#FFF; border:0; border-radius:3px; box-shadow:0 0 1px 0 rgba(0,0,0,0.5),0 1px 10px 0 rgba(0,0,0,0.15); margin: 1px; max-width:658px; padding:0; width:99.375%; width:-webkit-calc(100% - 2px); width:calc(100% - 2px);"><div style="padding:8px;"> <div style=" background:#F8F8F8; line-height:0; margin-top:40px; padding:50.0% 0; text-align:center; width:100%;"> <div style=" background:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACwAAAAsCAMAAAApWqozAAAABGdBTUEAALGPC/xhBQAAAAFzUkdCAK7OHOkAAAAMUExURczMzPf399fX1+bm5mzY9AMAAADiSURBVDjLvZXbEsMgCES5/P8/t9FuRVCRmU73JWlzosgSIIZURCjo/ad+EQJJB4Hv8BFt+IDpQoCx1wjOSBFhh2XssxEIYn3ulI/6MNReE07UIWJEv8UEOWDS88LY97kqyTliJKKtuYBbruAyVh5wOHiXmpi5we58Ek028czwyuQdLKPG1Bkb4NnM+VeAnfHqn1k4+GPT6uGQcvu2h2OVuIf/gWUFyy8OWEpdyZSa3aVCqpVoVvzZZ2VTnn2wU8qzVjDDetO90GSy9mVLqtgYSy231MxrY6I2gGqjrTY0L8fxCxfCBbhWrsYYAAAAAElFTkSuQmCC); display:block; height:44px; margin:0 auto -44px; position:relative; top:-22px; width:44px;"></div></div> <p style=" margin:8px 0 0 0; padding:0 4px;"> <a href="https://www.instagram.com/p/54GBHhJp6h/" style=" color:#000; font-family:Arial,sans-serif; font-size:14px; font-style:normal; font-weight:normal; line-height:17px; text-decoration:none; word-wrap:break-word;" target="_blank">No matter how you look at it, the #dourovalley is a special place... #visit #Portugal #Douro #ilovedouro #instatravel #instaphoto #landscape #nature #havinganaffair</a></p> <p style=" color:#c9c8cd; font-family:Arial,sans-serif; font-size:14px; line-height:17px; margin-bottom:0; margin-top:8px; overflow:hidden; padding:8px 0 7px; text-align:center; text-overflow:ellipsis; white-space:nowrap;">Uma foto publicada por The Tourists&#39; Affairs (@thetouristsaffairs) em <time style=" font-family:Arial,sans-serif; font-size:14px; line-height:17px;" datetime="2015-08-02T09:46:32+00:00">Ago 2, 2015 às 2:46 PDT</time></p></div></blockquote> <script async defer src="//platform.instagram.com/en_US/embeds.js"></script> It was running fine, all the site's current content was added without a problem and only recently, apparently without any changes, this started happening. Anyone got an idea what may be going on? Thanks, H
  7. In my last couple of projects I've used a hacked version of this module with an extra field for inputting image map coordinates. With a little snooping around and a good dose of patience my lack of module building knowledge didn't stop me So now this shopping centre's website has a store locator where you can hover hotspots, the marker appears in place and everything is configurable in the CMS. Before this was a Swiffy converted flash object. Here's the result in the frontend: http://www.miramaiashopping.pt/lojas/ And here's what it looks like in the CMS: Now I do have another project where I also have to add hotspots to an image for showing some text. But for that the module needs some serious work. I'm just going to make subpages of a type that only has a body field and use that. It would be cool to have this work like a repeater where you have full control of the fields for each marker and only link to pages if you need to, but that would mean rebuilding from the ground up.
  8. Already did, no cigar. If I get the first langFiles->lang, it returns 1010, same as outputting $user->language. Comparing those in an IF statement works, but the find returns nothing. I tried: find('lang.name='.$user->language->name); find('lang='.$user->language->id); find('lang.id='.$user->language->id); Nothing works. I even tried adding a title field and fake a string and still get nothing. Something's preventing that from working. But that foreach solves the problem and in this small site performance won't be an issue so I give up streamlining more.
  9. Found a pretty cool solution for this. Repeater + Page + Files. So I set up a repeater called langFiles. Inside that repeater I added a Page selector called lang and the files field. The page selector is set to be a single select, by template = language. So in the admin I get a repeater, add an item, select the language and upload the files. Add another one for the second language, and so on. Then on the frontend: // Somehow $page->langFiles->find('lang='.$user->language) doesn't work foreach ($page->langFiles as $lf) { if ($lf->lang == $user->language) { $filesRepeaterBlock = $lf; break; } } if ($filesRepeaterBlock->files->count) { echo '<ul>'; foreach ($filesRepeaterBlock->files as $file) { echo '<li><a href="'.$file->url.'" target="_blank">'.$file->name.'</a></li>'; } echo '</ul>'; } And there it is. Add a new language tomorrow, and it adapts. And it's not too weird for the admin.
  10. I think I misinterpreted you. Your approach is to add a file field for each language?
  11. Thx adrian, but this doesn't seem to work for file fields. Even with outputformatting set to false I always get the default language.
  12. Hi forum, I'm implementing a site where a files field needs to be language-sensitive. I don't mean descriptions, but the files themselves need to be different according to language. I could have a field for each language, but that would mean having to add new fields if we add new languages later on. So my attempt was to use the description as a filter. If there is one, show the file, if not ignore it. So a file that has a description only for english would only show when viewing english. But the description defaults to the main language. Is there a way to get the actual description on a given language without defaulting when it's empty? Or some other approach that's minimally elegant for this problem. Thanks, H
  13. Thanks for the tip @kongondo
  14. Hello fellow PWers. Today I'm proud to be doing my first installation of Form Builder on a project. Been waiting a while for this opportunity. However I'm stuck. I want to add a field on a template, where the user can select which form to embed there. I could just use an Options field and add the form list there manually, but it would be nice to have something more elegant that displayed all available forms and that updates options automatically if new forms are created. My first thought was Page Select, but it seems FB's forms aren't saved as pages. Any ideas? Thanks, H
  15. Thanks guys. Strip_tags worked like a charm