Jump to content

GeraldSchmidt

Members
  • Posts

    20
  • Joined

  • Last visited

Posts posted by GeraldSchmidt

  1. Before you duplicate "home" you have to change the "Can this template be used for new pages?" option in the home template's family settings, as it's set to "no" by default.

    i have set it to "yes" but i am still not able to duplicate the root-page

    Sry i am able to create a new subpage with the "home"-template  .... every change is recognized by the server/processwire....this is really strange!!!

    I don't get it... Only the root-page has this strange behavior :(

  2. I still doubt that it has to do with your PHP setup. What does happen if you try to duplicate the root page? Does the copy show the same problem?

    I am not able to duplicate the Root-Page (i mean with the same template called "home"). I have only created an subpage with a new template-file called "intro" (which is the copy of the home-template) but this is only an avoidance not a real solution

    6attfurl.png

  3. i have also tried to configure suhosin values:

    php_value suhosin.get.max_array_depth 1500
    php_value suhosin.get.max_array_index_length 1536
    php_value suhosin.get.max_name_length 768
    php_value suhosin.get.max_totalname_length 1536
    php_value suhosin.get.max_value_length 3072
    php_value suhosin.get.max_vars 6144
    php_value suhosin.post.max_array_depth 1200
    php_value suhosin.post.max_array_index_length 768
    php_value suhosin.post.max_name_length 768
    php_value suhosin.post.max_totalname_length 1536
    php_value suhosin.post.max_value_length 195000
    php_value suhosin.post.max_vars 6144
    php_value suhosin.request.max_array_depth 300
    php_value suhosin.request.max_array_index_length 768
    php_value suhosin.request.max_name_length 768
    php_value suhosin.request.max_totalname_length 1536
    php_value suhosin.request.max_value_length 195000
    php_value suhosin.request.max_varname_length 768
    php_value suhosin.request.max_vars 6144
    php_value suhosin.cookie.max_array_depth 1200
    php_value suhosin.cookie.max_array_index_length 768
    php_value suhosin.cookie.max_name_length 768
    php_value suhosin.cookie.max_totalname_length 1536
    php_value suhosin.cookie.max_value_length 60000
    php_value suhosin.cookie.max_vars 6144
    php_value suhosin.memory_limit 512M

    it doesnt work... I'm totally despairing right now... am i the only one with this special problem? I have also moved the whole project to another server without suhosin...i get the same error! What is wrong?

  4. One of my co-workers found the cause for my problem. The suhosin.ini on our server had a max length of 64 characters and we had to increased it to 128. 

    hi, i have a similar problem now. Which value did you increase from 64 to 128 ?

    My Problem: https://processwire.com/talk/topic/12207-suddenly-i-am-not-able-to-edit-fields-or-delete-images-in-home-page-root-page/

    Maybe you got the solution for my problem :-) thank you in advance for your help

  5. I don't think that the PHP version is the culprit - I have 5.6.17 as well, and it works. Did you check the file permissions, especially the site/assets/files/1 directory?

    The permissions are ok (755) - processwire is able to upload into this folder

    i have also the debugger set to "true". I am not getting any errors while i am trying to edit the root-page.... and Tracy Debugger is for Version 3

    I think i will reinstall Processwire....

  6. Hi,

    i don't understand why this problem only appears when im trying to edit the root page (home).

    All subpages are working.

    I made a video of the problem: Video

    My boss made an update yesterday from php version 5.3.29 to 5.6.17-1~he.2 (At the moment i am not able to downgrade the version)

    Maybe this is the reason?

    My Processwire Version: 2.7.2

    MySQL-Version (PHPMYADMIN)

    post-3414-0-13638200-1455315922_thumb.pn

    MySQL-Version (phpinfo();)

    post-3414-0-89677900-1455315934_thumb.pn

  7. Just a guess based on a quick look through the repeater source code, but maybe try hooking: FieldtypeRepeater::savePageField

    https://github.com/ryancramerdesign/ProcessWire/blob/master/wire/modules/Fieldtype/FieldtypeRepeater/FieldtypeRepeater.module#L958

    Also possibly: InputfieldRepeater::processInput (although this is before the repeater has saved, so not sure if it will be of any help)

    https://github.com/ryancramerdesign/ProcessWire/blob/master/wire/modules/Fieldtype/FieldtypeRepeater/InputfieldRepeater.module#L236

    Thank you so much for your advice adrian!!!

    Now it works!

    <?php
    
    class RepeaterLastItemCatcher extends WireData implements Module {
    
    	public static function getModuleInfo() {
    
    		return array(
    
    			// The module'ss title, typically a little more descriptive than the class name
    			'title' => 'RepeaterLastItemCatcher', 
    
    			// version number 
    			'version' => 2, 
    
    			// summary is brief description of what this module is
    			'summary' => 'Dieses Modul fängt den letzten Eintrag des Repeaters "" ab.',
    			
    			// Optional URL to more information about the module
    			'href' => 'https://onur-sahin.de',
    
    			// singular=true: indicates that only one instance of the module is allowed.
    			// This is usually what you want for modules that attach hooks. 
    			'singular' => true, 
    
    			// autoload=true: indicates the module should be started with ProcessWire.
    			// This is necessary for any modules that attach runtime hooks, otherwise those
    			// hooks won't get attached unless some other code calls the module on it's own.
    			// Note that autoload modules are almost always also 'singular' (seen above).
    			'autoload' => true, 
    		
    			// Optional font-awesome icon name, minus the 'fa-' part
    			'icon' => 'smile-o', 
    
    			);
    	}
    
    	public function init() {
    
    		// add a hook after the $pages->save, to issue a notice every time a page is saved
    		$this->pages->addHookAfter('FieldtypeRepeater::savePageField', $this, 'catchLastItem'); 
    
    	}
    
    	public function catchLastItem($event) {
    		
    		/*
    			Die Argumente sind die Parameterübergaben folgender Methode -> ___savePageField
    			https://github.com/ryancramerdesign/ProcessWire/blob/master/wire/modules/Fieldtype/FieldtypeRepeater/FieldtypeRepeater.module#L958
    		*/
    		$page = $event->arguments[0]; 
    
    		// Der zuletzt hinzugefügte Text des Referenz-Repeaters
    		$lastSavedReferencesText = $page->referencesList->last()->referencesText;
    
    		// Das zuletzt hinzugefügte Bild des Referenz-Repeaters
    		$lastSavedReferencesImage = $_SERVER['SERVER_NAME'].$page->referencesList->last()->referencesImage->first()->url;
    
    		// Testweise mal ausgeben im Backend
    		$this->message("lastSavedReferencesText: " . $lastSavedReferencesText);
    		$this->message("lastSavedReferencesImage: " . $lastSavedReferencesImage);
    
    		// Ab dieser Stelle kommt dann die Facebook-SDK zum Einsatz...
    
    	}
    
    }
    
    
    • Like 1
  8. I think i found a solution to detect the saving of the page but i cannot get the last-saved item. It only works when im not adding an entry to the repeater.

    <?php
    
    class RepeaterLastItemCatcher extends WireData implements Module {
    
    	/**
    	 * getModuleInfo is a module required by all modules to tell ProcessWire about them
    	 *
    	 * @return array
    	 *
    	 */
    	public static function getModuleInfo() {
    
    		return array(
    
    			// The module'ss title, typically a little more descriptive than the class name
    			'title' => 'RepeaterLastItemCatcher', 
    
    			// version number 
    			'version' => 2, 
    
    			// summary is brief description of what this module is
    			'summary' => 'Dieses Modul fängt den letzten Eintrag des Repeaters ab.',
    			
    			// Optional URL to more information about the module
    			'href' => 'https://onur-sahin.de',
    
    			// singular=true: indicates that only one instance of the module is allowed.
    			// This is usually what you want for modules that attach hooks. 
    			'singular' => true, 
    
    			// autoload=true: indicates the module should be started with ProcessWire.
    			// This is necessary for any modules that attach runtime hooks, otherwise those
    			// hooks won't get attached unless some other code calls the module on it's own.
    			// Note that autoload modules are almost always also 'singular' (seen above).
    			'autoload' => true, 
    		
    			// Optional font-awesome icon name, minus the 'fa-' part
    			'icon' => 'smile-o', 
    			);
    	}
    
    	/**
    	 * Initialize the module
    	 *
    	 * ProcessWire calls this when the module is loaded. For 'autoload' modules, this will be called
    	 * when ProcessWire's API is ready. As a result, this is a good place to attach hooks. 
    	 *
    	 */
    	public function init() {
    
    		// add a hook after the $pages->save, to issue a notice every time a page is saved
    		$this->pages->addHookAfter('save', $this, 'catchLastItem'); 
    
    	}
    
    	public function catchLastItem($event) {
    		$page = $event->arguments[0]; 
    		$this->message("Nachdem speichern der Seite: " . $page->referencesList->last()->referencesText); 
    
    	}
    
    	
    }
    
    

    sdfsdf

  9. Hi,

    following scenario:

    I have a Single-Page implemented with ProcessWire (So i got only one page in the Backend)

    post-3414-0-82860100-1453894135_thumb.pn

    The customer wants me to implement a functionality which recognize the current saved item of the repeater and publish it to his facebook-page. But this is my problem. I don't see any possibility to "catch" this last-saved entry of the repeater programmatically.

    This here is my repeater

    post-3414-0-68434300-1453894160_thumb.pn

    The name of the repeater is "referencesList" (the field-name)

    post-3414-0-98940200-1453894272_thumb.pn

    Do i have to programm a module for this plan?

    Thank you very much in advance for your answer :)

  10. Hello everyone

    i gotta simple problem :-) everytime after refreshing my backend, the fields that i have closed before are still opened (For example the repeater).

    is there a (maybe localstorage) functionality which remembers the action in relation to the open/close activity?

    post-3414-0-91339500-1443109778_thumb.pn

  11. <nav class="top-bar" data-topbar>
        <section class="top-bar-section">
          <ul class="right">
            <li class="divider"></li>
              <?php $treeMenu = $modules->get("MarkupSimpleNavigation"); // load the module
              $options = array(
              'has_children_class' => 'has-dropdown'
              );
              echo $treeMenu->render($options); // render default menu ?>
            </li>
          </ul>
        </section>
    </nav>
    

    The pattern is very easy. The above example will attach the class "has-dropdown" to every list item that has a submenu. Try to understand the Readme by comparing it to my example and you will understand quickly.

    Edit: Misspelling corrected

    Are you sure that this one is the full solution? :-)

    Your solution is missing the <ul class="dropdown"> dropdown class value. This was the reason why it was not working for me

    My solution looks like this: (Adding inner_tpl Option)

    <nav class="top-bar" data-topbar>
        <section class="top-bar-section">
          <ul class="right">
            <li class="divider"></li>
              <?php $treeMenu = $modules->get("MarkupSimpleNavigation"); // load the module
              $options = array(
                  'has_children_class' => 'has-dropdown',
                  'inner_tpl' => '<ul class="dropdown">||</ul>',
              );
              echo $treeMenu->render($options); // render default menu ?>
            </li>
          </ul>
        </section>
    </nav>
    
  12. I have solved my problem!

    See attached image file for the structure.

    I have installed the "Hannah Code Text Formatter" and created my own code for the tooltip!

    <?php
    
        $tooltipMessage = isset($tooltipMessage) ? htmlentities($tooltipMessage) : "";
        $tooltipAnchorname = isset($tooltipAnchorname) ? htmlentities($tooltipAnchorname) : "";
        $output = '<a class="bootstrap-tooltip" title="" data-toggle="tooltip" type="button" data-original-title="'.$tooltipMessage.'">'.$tooltipAnchorname.'</a>';
        echo $output;
    
    ?>
    

    The usage of the code:

    [[bootstrapTooltip tooltipMessage="The TooltipMessage....." tooltipAnchorname="My ToolTip-Link"]]

    My template file contains following code (see attached image file, the marked area shows the important part of the code)

    <?php
    	foreach($page->colorPaletteBoxRepeater as $actualColorPaletteBoxRepeater) { 
    		$getActualColorPaletteBoxesListArray = array_values(array_filter(explode(PHP_EOL, $actualColorPaletteBoxRepeater->colorPaletteBoxesList)));
    		$getActualColorPaletteBoxesListHTML = "";
    		foreach($getActualColorPaletteBoxesListArray as $getActualColorPaletteBoxesList) $getActualColorPaletteBoxesListHTML .= '<li class="list-group-item">'.$getActualColorPaletteBoxesList.'</li>';
    		echo '<article class="'.$actualColorPaletteBoxRepeater->colorPaletteBoxesBackgroundSelector->title.'">';
    		echo '<div class="container">
    				<div class="jumbotron">
    					<div class="row clearfix">
    						<div class="col-lg-6 column">
    							<i class="fa fa-'.$actualColorPaletteBoxRepeater->fontIconPicker.' services-font-icon"></i>
    						</div>
    						<div class="col-lg-6 column">
    							<h1>'.$actualColorPaletteBoxRepeater->colorPaletteBoxesHeadline.'</h1>
    							<p>'.$actualColorPaletteBoxRepeater->colorPaletteBoxesParagraph.'</p>
    							<ul class="list-group">
    								'.$getActualColorPaletteBoxesListHTML.'
    							</ul>
    							<p>
    								<a class="btn btn-primary btn-lg" href="'.$actualColorPaletteBoxRepeater->colorPaletteBoxesLink.'" role="button">'.$actualColorPaletteBoxRepeater->colorPaletteBoxesLinkName.'</a>
    							</p>
    						</div>
    					</div>
    				</div>
    		</div>';
    		echo '</article>';
    	}
    ?>
    
    

    post-3414-0-32670100-1431984381_thumb.pn

    post-3414-0-10380100-1431984963_thumb.pn

  13. Hi @adrian thanks for your reply! I have tested the Option FieldType but the problem is that i'm only able to store single value information.

    Is it possible to add a option field which opens an further input-field where the user is able to add further information?

    I mean something like this:

    User is adding Option Value "Any List Point"

    After adding the value we are able to store random text to "Any List Point" for example by an Input-Field. It would be nice if i could add a lot of options just for one option value.

    Example Iteration could be something like this:

    foreach($page->fieldname as $item) {
        echo "<li>{$item->firstMessage}{$item->tooltip}{$item->secondMessage}</li>";
    }

    regards,

    Gerald

    post-3414-0-90042600-1431774660_thumb.pn

  14. Hello,

    I'm a true beginner at processwire and this is my first post! So first of all I would like to address my cordial greeting to all of you :-)

    What i want to know is how to handle a bootstrap list with field types in processwire. I could use a simple text input field with commas and cut them for iterating but this is not a good solution. And the other problem is that i also want to implement the bootstrap-tooltip (see attached image file)

    What is the best solution for this problem?

    Thank you very much in advance for your answer.

    regards,

    Gerald

    post-3414-0-93515800-1431728056_thumb.pn

×
×
  • Create New...