Jump to content

heldercervantes

Members
  • Posts

    389
  • Joined

  • Last visited

  • Days Won

    15

Everything posted by heldercervantes

  1. 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
  2. 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.
  3. 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.
  4. 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.
  5. I think I misinterpreted you. Your approach is to add a file field for each language?
  6. Thx adrian, but this doesn't seem to work for file fields. Even with outputformatting set to false I always get the default language.
  7. 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
  8. 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
  9. Hello chaps. Anyone know a smart (as in short and sweet) way of rendering a textarea that is configured to use CKedit, as plain text? The regular, html version of the field's content is used on the page, but then I need a clean alternative version for some cases. Thanks, H
  10. Thanks for your help. I used Ryan's suggestion of starting the path to my includes with "./" <?php include('./includes/footer.inc.php'); ?> Worked like a charm.
  11. Hi guys. I'm having this weird problem with translatable text. I have it in just about every template of the site and it works fine with one exception. In every template I'm including a footer, using a regular: <?php include('includes/footer.inc.php'); ?> Then in that file I have this: <footer> <div class="row"> <div class="slogan"><?= $home->slogan; ?></div> <div class="social"> <?= __('Follow us'); ?> ... That "follow us" string shows up to be translated on the cms, and so does a second string I have a few lines down, but on the frontend it always renders what's in the code. It doesn't replace with what's set on either the current language or the default language. Just ignores everything. Any idea what's going on here? Thanks, H
  12. Freakin awesome! @teppo: site of the week right here.
  13. I'm doing a modded implementation on a new project using PW 3.0.41 right now. Works like a charm.
  14. Either I'm missing something or the module is not working properly in version 3.0.33 devns. I installed it, configured my basic page to be included and sure enough started seeing page edits appear listed on the history tab, even identifying the changed fields correctly. However, preview always shows the current version and revert has no effect.
  15. Hey Bitpoet. Any progress on that sweet module of yours?
  16. Well, turns out it was a hosting problem. The account wasn't properly configured and ran out of space
  17. I'm getting this weird error, any idea how to get around it? I was having problems importing content via API. I had a bunch of tech PDF files to add to a products catalogue and the online server was timing out in the operation. So I used Ryan's ProcessDatabaseBackups module to grab the DB from the online server and downloaded the whole assets directory to update my local version, then did the PDF import locally. Then I used the same module to overwrite the online DB and reuploaded the assets folder. Now there's a first section of products that work fine, as does the rest of the site, but getting to an image from the second section on PW crashes and outputs this error. The same page that outputs this, when edited on the CMS shows no problems. I've also checked permissions and even went 777 on the whole thing, but no cigar. Error: Exception: Unable to create temp dir - /var/www/vhosts/isma.pt/httpdocs/site/assets/cache/WireTempDir/.PagefilesManager2231/1/ (in /var/www/vhosts/isma.pt/httpdocs/wire/core/WireTempDir.php line 113) #0 /var/www/vhosts/isma.pt/httpdocs/wire/core/PagefilesManager.php(473): WireTempDir->get() #1 /var/www/vhosts/isma.pt/httpdocs/wire/core/Pageimage.php(361): PagefilesManager->getTempPath() #2 /var/www/vhosts/isma.pt/httpdocs/wire/core/Pageimage.php(245): Pageimage->___size(270, 284, Array) #3 /var/www/vhosts/isma.pt/httpdocs/site/templates/product.php(39): Pageimage->size(270, 284) #4 /var/www/vhosts/isma.pt/httpdocs/wire/core/TemplateFile.php(182): require('/var/www/vhosts...') #5 [internal function]: TemplateFile->___render() #6 /var/www/vhosts/isma.pt/httpdocs/wire/core/Wire.php(398): call_user_func_array(Array, Array) #7 /var/www/vhosts/isma.pt/httpdocs/wire/core/Wire.php(333): Wire->runHooks('render', Array) #8 /var/www/vhosts/isma.pt/httpdocs/wire/modules/PageRender.module(422): Wire->__call('render', Arr
  18. Yeah in this case the problem was a dirty solution that I hadn't noticed I left there, mixing hard-coded names in the JS with names read from the pages when passing things around. Stupid mistake.
  19. Thanks for the heads up Dragan. It appears "someone" changed the name of two pages that are vital for the finder
  20. Hi guys, Just launched my latest project, The Tourists' Affairs: http://www.thetouristsaffairs.com/en/ This one was a pleasure to build. It's based on a tours catalogue, features a tour finder, and for the first time I based a gallery on Instagram embeds. You can see those working on each tour. I'm using my basic ingredient set here: Languages, AIOM+, MarkupSEO, and not much more. Not big or complicated, but neat.
  21. I've had this happen before, but now I got this problem again and I'm wondering what it's about. I use the basic <?= __('Contacte-nos') ?> method for adding translatable text to templates. Some of these are not appearing on the form when I edit the file's translations in PW. Take this line of code: <?= __('1 ou +7 pessoas?') ?> <a href="#" class="contactsMenu"><?= __('Contacte-nos') ?></a> The first string "1 ou +7 pessoas?" appears when I edit the translations, but the second one doesn't. Eventually I figured out I can only have one of these per line of code. Adding a line break somewhere somewhere between them was enough to make both translations show up in the form. Problem solved, but curiosity remains. What is the reason for this?
  22. Hi guys. I'm about to launch a new website for a client in Denmark and he asked for hosting provider suggestions. We don't need much, it's a small site. Anyone got a recommendation? thx, H
×
×
  • Create New...