Jump to content

tron1000

Members
  • Posts

    38
  • Joined

  • Last visited

Posts posted by tron1000

  1. Hi Zeka and dragan, thanks a lot for your answers! I found out that changing the order of the language pages in Admin > Setup > Languages caused the problem. I had changed the order a while ago. As soon as I moved the default language (english) back to the first position, the tabs looked ok again. I don't know why that happens.

    Anyways, thanks a lot for your help!

    • Like 2
  2. Hello! After I upgraded PW from 2.5.? to 3.0.116, my language tabs in the backend behave strange. I have 3 languages: german, french and english (default). Since I upgraded, all multilingual fields show the 3 tabs (DE, FR, EN) plus an additional textfield below for EN (see screenshots). The german tab is ok, but the upper tabs FR and EN both show the content in french, while the additional tab below shows the english content. When I click on the folder icon to the right to change the view, all looks ok. Also the frontend is ok.

    I uninstalled and reinstalled the module «LanguageTabs», but that didn't help …

    Any ideas?

    Thanks a lot, Andrej

    Bildschirmfoto 2018-10-21 um 20.04.34.png

    Bildschirmfoto 2018-10-21 um 20.01.58.png

  3. Hi dragan! Thanks a lot for your help! Ich checked the source code and found inline styles setting the iframe's width to «auto»:

    <iframe class="pw-modal-window ui-dialog-content ui-widget-content" frameborder="0" src="/preview/backend/page/edit/?id=1044&amp;fields=events&amp;modal=1" id="pw-modal-window-1" style="width: auto; min-height: 0px; max-height: none; height: 813.03125px;"></iframe>

    I realized that the only thing that prevents the error is to remove jquery.js from the head section:

    <script src="<?php echo $config->urls->templates?>node_modules/jquery/dist/jquery.js"></script>

    I have no idea how / why this happens. The version of the linked jquery is 3.3.1.

    Edit: here is the complete source code with all js and stylesheets removed except for the mentioned jquery link. This still produces the bad layout:

    <!doctype html>
    <html class="no-js" lang="en">
      <head>
        <meta charset="utf-8">
        <meta http-equiv="x-ua-compatible" content="ie=edge">
        <meta name="viewport" content="width=device-width, initial-scale=1.0">
        <title>Zimoun</title>
        <script src="<?php echo $config->urls->templates?>node_modules/jquery/dist/jquery.js"></script>
      </head>
      
      <body>
        
        <a id="button"><i class="fas fa-arrow-up fa-lg"></i></a>
        
        <a href="#" class="menu-button" id="menuButton" data-toggle="offCanvasRightSplit2"><span class="burger-icon"></span></a>
        
        <div class="grid-x">
          <div class="cell">
            <h1 id="logotype"><a href="<?php echo $pages->get("/")->url; ?>">Zimoun</a></h1>
          </div>
        </div>
        
        <div class="grid-x">
          <div class="cell content">
            <edit fields="events">
            <h1>Current and upcoming</h1>
            <?php
            $today = time();
            
            foreach($page->children("include=hidden")->find("date_to>$today") as $event) {
              
              if($event->event_url) {
              
              $website = "<br><a class='event_website' href='{$event->event_url}' target='_blank'>Website</a>";
              
              }
              
              else $website = "";
                         
              
              if($event->date_from != $event->date_to) {
                
                echo "<p>$event->title<br>$event->event_type, {$event->date_from}–{$event->date_to}$website</p>";
                
              }
              
              else
              
              echo  "<p>$event->title<br>$event->event_type, {$event->date_to}$website</p>";
            
            }
            ?>
            <div class="disclaimer_events">All information based on current knowledge and subject to change.</div>
            </edit>
          </div>
        </div>
        
        <div class="off-canvas position-right" id="offCanvasRightSplit2" data-off-canvas data-close-on-click="true">
          <?php include "nav.inc"; ?>
        </div>
        
        
      </body>
    </html>

     

  4. Hi matjazp! Thanks for your reply! I tried both (the «edit» part and PW 3.0.111 DEV) but it looks the same. So maybe this issue is specific to my setup … I use Zurb Foundation too, maybe there is some conflict there …

    Although I disabled all CSS and it still looked the same (Safari, Firefox and Chrome).

  5. Hello! I use PW 3.0.98 and I have frontend editing enabled for a PageTable Field. Somehow, when I double click the field in the frontend, the iframe in wich the content is displayed is very small (see screenshot). I couldn't find out if thats some CSS conflict or another problem. Any suggestions? Thanks, Andrej

     

    Bildschirmfoto 2018-08-24 um 18.58.07.png

  6. Hi BitPoet, thanks a lot for your reply! I could not change the setting you mentioned myself, so I contacted the host. They added the following code to my .htaccess file:

    # ModSec Exceptions by cyon
    
    <IfModule mod_security2.c>
            SecRuleRemoveById 340145
    </IfModule>

    A rule in their Web Application Firewall led to the error.

    Thanks again!

    • Like 1
  7. Hello!

    I have a repeater containing images and two textfields. Everything works fine, but when I reorder them by dragging them in the backend and hit save, they go back to their old position.

    What could be the problem there?

    Thanks, tron1000

    Edit: PHP Version is 5.4.14-pl0-gentoo

    … and adding and removing a repeater as a workaround like proposed in this post doesn't help.

  8. Hello everyone

    My question is very noobish, but I found no way to accomplish something simple. Also related posts in the forum where to difficult to work with for me …

    I would like to sort upcoming and past events which are repeaters by their end date field.

    The output should look something like this:

    UPCOMING EVENTS

    Title event 1

    26. November to 27. November 2014

    Title event 2

    29. November  2014

    PAST  EVENTS

    Title event 3

    12. November 2014

    Title event 4

    1. August to 5. August 2014

    My code only returns the last of the created events as many times as there are events ???. Am I completely on the wrong way? Any hint would be very appreciated …

    Thanks, tron1000

    setlocale(LC_TIME, 'de_DE');
    
    echo "<h1>Events</h1>";
    
    foreach($page->event as $event) {
    
    $event_title = $event->event_title;
    $date_to = $event->getUnformatted('event_date_to');
    $today = time();
    
    $date_from_formatted = strftime('%d. %B %Y', $event->getUnformatted('event_date_from'));
    $date_to_formatted = strftime('%d. %B %Y', $event->getUnformatted('event_date_to'));
    
    if ($date_from_formatted == $date_to_formatted)
    $event_out = "{$event_title}<br>{$date_from_formatted}<br><br>";
    
    else
    $event_out = "{$event_title}<br>{$date_from_formatted} to {$date_to_formatted}<br><br>";
    
    }
    
    echo "UPCOMING<br><br>";
    
    if ($date_to > $today)
    
    foreach($page->event as $event) {
    echo $event_out;
    }
    
    echo "PAST<br><br>";
    
    if ($date_to < $today)
    foreach($page->event as $event) {
    echo $event_out;
    }
    
  9. Hello everyone,

    I have a problem with a password protected folder. When I try to access it, I get a «404 page not found» error.

    First, here is the file structure:

    /

      - public_html

            - guestcal

                   - admin (protected)

            - wire

            - site

            - etc …

    The protection was created through my hosts backend. This automatically created a .htaccess file in the folder «admin» with the following content:

    AuthType Basic
    AuthName "Administration Kellervermietungen"
    require valid-user
    AuthUserFile "/home/schloss2/.htpasswds/public_html/guestcal/admin/passwd"

    I have an alternative url to the site from my host (http://server47.cyon.ch/~schloss2/). When I prepend this instead of the domain name in the browser, the url (http://server47.cyon.ch/~schloss2/guestcal/admin) works fine.

    I have zero experience with .htaccess stuff … Is there a conflict with pw? Can someone help?

    Thanks a lot,

    tron1000

  10. Hi everyone,

    I just tried to password protect a directory in my public_html directory (where also the processwire folders are) through my host's services page. As soon as it is protected, I can't access it anymore through my browser (page not found error message appears).

    Does this problem have to do with processwire and is there a way around it? Any help would be very appreciated.

    Thanks, Tron1000

  11. Hi all!

    I have the exact same problem and try to reorder the languages. I also moved them around (yes, in the page tree), but the order on my client's site stays the same (default, français, deutsch).

    Is there something wrong with my code that generates the language picker?

    <?php 
    
    // remember what language is set to
    $savedLanguage = $user->language; 
    
    foreach($languages as $language) {
    
      // if this page isn't viewable (active) for the language, skip it
      if(!$page->viewable($language)) continue;
    
      // set the user's language, so that the $page->url and any other
      // fields we access from it will be reflective of the $language
      $user->language = $language;
      
      $activeClass = $savedLanguage == $user->language ? ' class="active"' : '';
    
      // output a link to this page in the other language
      echo "<li><a$activeClass href='$page->url'>$language->title</a></li>";
    }
    // restore the original language setting 
    $user->language = $savedLanguage; 
    
    ?>
    

    Thanks, tron1000

  12. Thank you Wanze!!!!!! Is works again. You saved me a lot of work …

    Something is strange thought. I have to put pages_id=2 to data=87 like you said before. Otherwise my browser tells me, that there are too many redirects and the page could not be opened.

    But finally in table «field_process» pages_id=2 with data=87 and pages_id=23 with data=10 works perfect.

    Thanks so much for your help people! This community is great …

    Greetings, tron1000

  13. Hi Wanze,

    Thanks for your reply!

    Unfortunately it didn't work.

    In table pages, the entry with id=2 had templates_id=2.

    I tried to add anew entry in table field_process, but I received the following error message: Duplicate entry '2' for key 'PRIMARY'.

    Maybe this appears, because there already is an entry with pages_id=2. This entry had data=10. When I change data to 87 there, nothing changes.

    Thanks, tron1000

  14. Hello everyone,

    It seems that I managed to mess up my Login page. I tried to use a custom template for it and when changing the template, I got the warning, that the field «process» will be deleted. (I hope I remember this right …)

    Of course I ignored the warning :-[ and my custom template didn't work properly, so I changed back to the processwire admin template again. Since I logged out, if I try to log in, I see no form, but the message «This page has no Process assigned».

    Is there a way for me to get back in and fix the Login page??

    Any help would be very appreciated and sorry for my carelessness …

    tron1000

×
×
  • Create New...