Jump to content

eutervogel

Members
  • Posts

    22
  • Joined

  • Last visited

  • Days Won

    1

Posts posted by eutervogel

  1. Hello,

    my english is not good enough to describe my problem better in the topic.
    I'm working on a new site. Fresh blank install. I wrote a template file and everything is working so far but at the end of that page a new document is added for some reason so it looks like this:
    image.thumb.png.e731999ea576581a4fc8948bcd64e790.png

    right after my closing html tag this is added:

    </html><!DOCTYPE html>
    <html lang="en">
    	<head id="html-head">
    		<meta http-equiv="content-type" content="text/html; charset=utf-8" />
    		<title>Home</title>
    		<link rel="stylesheet" type="text/css" href="/site/templates/styles/main.css" />
    		<script src="/site/templates/scripts/main.js"></script>
    	</head>
    	<body id="html-body">
    
    		<p id="topnav">
    			<a href='/'>Home</a> / <a href='/einstellungen/'>Einstellungen</a> / <a href='/arbeiten/'>Arbeiten</a> / <a href='/test/'>test</a>		</p>
    		
    		<hr />
    		
    		<h1 id="headline">
    						Home		</h1>
    		
    		<div id="content">
    			Default content
    		</div>
    	
    				<ul> 
    			<li><a href='/einstellungen/'>Einstellungen</a></li><li><a href='/arbeiten/'>Arbeiten</a></li><li><a href='/test/'>test</a></li>		</ul>	
    				
    				<p><a href='/pw-login/page/edit/?id=1'>Edit this page</a></p>
    			
    	</body>
    </html>

    I could not find a source for that and I thought maybe it's caused by something in my template file so I created a new file, left it completely empty, set it up as a template, created a new page with this template and what should I say? It's exactly the same html
    image.png.5ae7f5f7126d2f75da7deab92c63c46e.png

    I can't get it. Can someone please give me a hint, what could cause this?
    Thanks in advance

    PS: I just thought maybe that's because I'm logged in and debug mode is on, but no, it's the same for logged out users except the Edit this page link, of course

  2. Hi, 

    what I try do do is the following:

    I have a parent with children. In those children there are nested repeaters. I want to find all occurences where id=$userid for example.

    So the structre is:

    Parent
         ---->Child
               ---->Repeater
                        ----> Repeater
                                  ----> Field

    I want to count how often $userid i in the id-field of all children of that parent.

    I hope that's understandable. If not please let me know.

  3. Hi, 
     

    when I try to do that in my template:
     

    echo "<h2>" . __("Keine Uploads vorhanden") . "</h2>";

    I'm running into an error:  Fatal Error: Uncaught Error: Call to undefined function __()

    So I tried to do it this way:
     

    echo "<h2>" . $this->_("Keine Uploads vorhanden") . "</h2>";

    That doesn't produce an error but the translation is not shown.

    I used the first version in other websites before and never had an issue;

    PW-Version: 3.0.148

    What could be wrong here?

  4. Hi, 

    what I'm doing is this:
     

     <picture>
    	<source srcset="<?php echo $page->section_three->main_img->first()->size(396,710)->webp->url; ?>" type="image/webp">
    	<img class="p_absoulte pp_block" src="<?php echo $page->section_three->main_img->first()->size(396,710)->url; ?>" alt="">
    </picture>

    and for some reason it sometimes becomes this:

    <picture>
    	<source srcset="/site/assets/files/1057/sektion3_bild-1.396x710.png" type="image/webp">
    	<img class="p_absoulte pp_block" src="/site/assets/files/1057/sektion3_bild-1.396x710.png" alt="">
    </picture>

    It seems to be related to ->size(). When I don't use ->size() the webp Url is correct.
    I'm using the image-field inside a Fieldset(Page). Could that be a problem too?

    I just increased the output size by 2px and voila the webp url comes up. 
    I deleted all variations (webp variation is present in correct size) changed it back to the original size and again: a png url.

    I also tried to rename the image and load it up agian. 

    ...same behavoir.

    Thanks in advance guys
     

  5. Hi, 

    I've build a little Page for my brother where he can upload a cvs file to upload multiple images at a time. The images contain a german desc an english desc numer of likes and so on.
    Everything is working fine so far, but when the german description contains ä, ö or ü the description field stays emtpy. 

    I tried too use different sanitizers, but, no luck so far. 

    $string = 'Drosselrohrsänger';
    
    $string = $sanitizer->entities($string);
    
    echo $string

    No output 

    What am I doing wrong?
     

  6. Hey, 

    I have freshly installed the module and for some reason I get some issues which I don't understand.

    As you can see below, after aiom/ the domain is cut off. Where is the dani?

    GET https://www.danielholte.de/site/assets/aiom/elholte.de/site/templates/img/play_back.png 404 (Page Not Found)

    This is how I've done:

    <link rel="stylesheet" type="text/css" href="<?php echo AllInOneMinify::CSS(array('css/main-' .$style .'.css', 'css/grid.css', 'css/pm-icons.css', 'css/fontawesome.css', $config->urls->FieldtypeComments . 'comments.css', 'css/overwrite.css')); ?>">
    
    <script src="<?php echo AllInOneMinify::JS(array('js/jquery.min.js', 'js/main.js', 'js/isotope.pkgd.min.js', 'js/jquery.magnific-popup.min.js', 'js/jquery.mousewheel.js', 'js/jquery.jscrollpane.min.js', $config->urls->FieldtypeComments .'comments.min.js')); ?>"></script>

    This is such a strange issue, that I don't know where to start investigation.

    Thanks in advance

     

    PS: Just saw that my Post is totally wrong here. Sorry. Please move.

    I think it must be related to ../

    This is my original css:

    .pm_menu_mobile_toggler {
            width: 27px;
            height: 22px;
            background: url("../img/icons-light/retina/pmicon-073.png") no-repeat center;
            background-size: 27px 22px;
            display: inline-block;
            position: relative;
            top: 6px;
        }

    and this is what comes out:

    .pm_menu_mobile_toggler {
            width: 27px;
            height: 22px;
            background: url("elholte.de/site/templates/img/icons-light/retina/pmicon-073.png") no-repeat center;
            background-size: 27px 22px;
            display: inline-block;
            position: relative;
            top: 6px;
        }

    Allow Directory Traversal in Options is hooked.

  7. Hi, 

    I have some issues since the last update of the module.
    If a menu item has children it doesn't get the class provided in the options array (in my case 'menu-item-has-children').
    The a tag is not even in a li?!?!

    Here is my code:

    $options = array(
      'wrapper_list_type' => 'ul',
      'list_type' => 'li',
      'menu_css_id' => '',
      'menu_css_class' => 'menu',
      'submenu_css_class' => 'sub-menu',
      'has_children_class' => 'menu-item-has-children',
      'first_class'=>'',
      'last_class' => '',
      'current_class' => 'current-menu-item',
      'default_title' => 1  ,
      'include_children' => 4,
      'm_max_level' => 2,
      'current_class_level' => 1,
      'default_class' => 'menu-item',
    );
      $menu = $modules->get('MarkupMenuBuilder');
      echo $menu->render('hauptmenu', $options);

    And this is what comes out (look at Fotografie for example?
     

    <ul class="menu">
      <li class="menu-item">
        <a href="/" class="pm_text_menu_item">Start</a>
      </li>
      	<a href="/fotografie/" class="pm_text_menu_item">Fotografie</a>
      <ul class="sub-menu">
        <a href="/fotografie/landschaften/" class="pm_text_menu_item">Landschaften</a>
        <ul class="sub-menu">
          <li class="menu-item">
            <a href="/fotografie/landschaften/wald/" class="pm_text_menu_item">Wald</a>
          </li>
          <li class="menu-item">
            <a href="/fotografie/landschaften/strand-kuste/" class="pm_text_menu_item">Strand &amp; Küste</a>
          </li>
        </ul>
        <a href="/fotografie/tiere/" class="pm_text_menu_item">Tiere</a>
        <ul class="sub-menu">
          <li class="menu-item">
            <a href="/fotografie/tiere/amphibien-reptilien/" class="pm_text_menu_item">Amphibien &amp; Reptilien</a>
          </li>
          <li class="menu-item">
            <a href="/fotografie/tiere/arthropoden/" class="pm_text_menu_item">Arthropoden</a>
          </li>
          <li class="menu-item">
            <a href="/fotografie/tiere/saugetiere/" class="pm_text_menu_item">Säugetiere</a>
          </li>
          <li class="menu-item">
            <a href="/fotografie/tiere/vogel/" class="pm_text_menu_item">Vögel</a>
          </li>
        </ul>
        <li class="menu-item">
          <a href="/fotografie/stimmungen/" class="pm_text_menu_item">Stimmungen</a>
        </li>
      </ul>
      <li class="menu-item">
        <a href="/video/" class="pm_text_menu_item">Video</a>
      </li>
      <li class="menu-item current-menu-item">
        <a href="/daniel-holte/" class="pm_text_menu_item">Daniel Holte</a>
      </li>
      <li class="menu-item">
        <a href="/kontakt/" class="pm_text_menu_item">Kontakt</a>
      </li>
      <li class="menu-item">
        <a href="/impressum/" class="pm_text_menu_item">Impressum</a>
      </li>
    </ul>

    So as you can see the li tags for menu items with children are completly missing. I have no idea why and as I said above, I changed nothing except the upadte of the module.

    Thanks in advance

  8. Thanks for your answer flydev,

    I think adding a custom field for IDs would do the job. 

     

    But,
     

    Quote

    To automate the update of the custom ID field when images are added to the image field, you will have to hook and do your logic inside the hook: checking for existing ID and assigning a new one.

    I don't have any idea to do that. Can you please point me in the right direction?

  9. Hi, 

    I want to build a likesystem for images on my page. 

    I've added a field called likes to my imagefield using ImageExtra module.

    likesfield.thumb.JPG.efbce2a49ab2d1565cff7dd1ddcac5b3.JPG

     

    Now I have this field in all images in my gallery.
    So far so good, but how can I update that field using the API?

    If you hover a image a heart-button appears, If you click this heart, the likevalue should increase by one.
    heartbutton.thumb.JPG.4dff3ab7a19a086f142631af7a977eb7.JPG

     

    But how to identify which image is clicked, since there are no IDs for images. 

    So the question is, how to identify an image inside a images field with lots of images?

     

    I hope you could understand by brilliant english ;)

    Thanks in advance.

  10. Hi,

    On my website the user is able to choose between to styles of a gallery. A gridview and a stripe view.

    I want to store the choice during the whole session. 

    So if the user chooses a style I do it like so:

    $query = $_GET['view'];
        if($query){
            $session->set('view', $query);
        }

    So that's working pretty fine, but after a random number of menuclicks or reloads its gone. Sometimes it is stored for 10 -15 pageloads and sometimes it's gone after 2 loads,

    Lifetime is set to 3600 in php.ini

    session.gc_maxlifetime = 3600

     

    This is how I look if it exists:   

     if($session->view == 'grid'){
            include('album-grid-title.php');
            $session->set('view', $query);
        }
        elseif($session->view == 'stripes'){
            include('album-stripes.php');
            $session->set('view', $query);
        }
        else{
            include('album-stripes.php');       
        }

     

    Can anyone point me in the right direction and tell me what I'm doing wrong or why $session gets lost?

     

    Thanks in advance

  11. A little bit more detail:

    when I do this:

    $page_exsists->url;

    I get this:

    /repeaters/for-field-152/for-page-0/

     So it seems, that the repeater fields are not deleted when the page is deleted.
     

    If I search in my database for one of the ids I get back this is the result:
     

    SELECT * 
    FROM `MYDB`.`pages` 
    WHERE (

    CONVERT( `id` 
    USING utf8 ) LIKE '%1157%'
    OR CONVERT( `parent_id` 
    USING utf8 ) LIKE '%1157%'
    OR CONVERT( `templates_id` 
    USING utf8 ) LIKE '%1157%'
    OR CONVERT( `name` 
    USING utf8 ) LIKE '%1157%'
    OR CONVERT( `status` 
    USING utf8 ) LIKE '%1157%'
    OR CONVERT( `modified` 
    USING utf8 ) LIKE '%1157%'
    OR CONVERT( `modified_users_id` 
    USING utf8 ) LIKE '%1157%'
    OR CONVERT( `created` 
    USING utf8 ) LIKE '%1157%'
    OR CONVERT( `created_users_id` 
    USING utf8 ) LIKE '%1157%'
    OR CONVERT( `published` 
    USING utf8 ) LIKE '%1157%'
    OR CONVERT( `sort` 
    USING utf8 ) LIKE '%1157%'

    )
    LIMIT 0 , 30
     

  12. Hi, I got a little problem and I hope you could help me:
    What I'm doing is this :

    $page_exsists = $pages->get("title=$searchtitle");

    The problem is, it finds pages that have exsited. I trashed them and emtied trash, but they still seem to be somewhere?!

    So if I do $page_exsists->id; 

    I get an id back?!

    I hope you could understand my bad english „smile“-Emoticon 
    Thanks for your help.

×
×
  • Create New...