Jump to content

Pip

Members
  • Posts

    85
  • Joined

  • Last visited

Posts posted by Pip

  1. Hi everyone!

    Was wondering if anyone been getting this error when you import? 
     

    Quote

    Warning: count(): Parameter must be an array or an object that implements Countable in D:\XAMPP\htdocs\d2g2\site\modules\ImportPagesCSV\ImportPagesCSV.module on line 515

    Been scratching my head on this. Checked 515 and this is what I got. 

    		if($page->id && count($page->get('ImportPagesCSVData'))) {

    Any idea what's tripping it? 
     

  2. On 8/16/2020 at 4:05 AM, Pip said:

    I tried changing my admin email address. It's still stuck with the old one. Searched the whole database as well as any hard coded ones, none. 

    What sorcery is this, @ryan

    ---- Sincerely, dumbfounded struck confused noob PW user. ?

    So apparently after going through stuff the reason as to why the email address never changed is due to the XAMPP settings. Despite setting the settings that way, it overwrites the sender still. 

    Oh wells. Silly me calling it sorcery. ?

  3. Hi guys

    Just want to confirm something before I go calling the ghost busters or something. So here's aroughsummary.: 

    • I'm currently working on a Xampp environment. 
    • Each site I work on, I customize the domain from localhost -> confabulations. No .com, .net, .org, etc.
    • I've installed processwire and it automatically sets this in the config: 
      $config->httpHosts = array('confabulations');
    • Everything works well in Login/Register until one day, I get this error when I register on the site (locally). 
      image.thumb.png.b723ddf14a544db41d0ae154f22d6b4c.png

    Which is weird because I have not been customizing the module itself. Not until I change this: 
     

    $config->httpHosts = array('confabulations.com');

    Then it works. 

    I mean sure fine theoretically if I change my vhost etc to confabulations.com it should work. But what I do not understand why suddenly trigger such error when the only modules I have is the Sitemap and Login/Register/Profile. ?

     

  4. 9 hours ago, 7Studio said:

    $config->adminEmail = 'my@email.com'; $modules->LoginRegister->execute();

    Tried this. Though theoretically it is sound, email address is still stiff. I got my admin email address still.

    Worst even if I do this, my Login Register comes out empty. 

    I have do this in order to work (just to have the module work work): 

    9 hours ago, 7Studio said:
    
    <?php $config->adminEmail = 'my@email.com'; ?>
    <?=$modules->LoginRegister->execute(); ?>

     

    Take note: Email address is still the same as admin.

    I've checked the error logs, everything seems to be in  working order. 

  5. And fast forward to 2020, has anyone figured this out yet? 

    Tried doing this but as expected, it is overwritten. ? Changing the config is out of the question because this would mean all other updates will bounce off. 

     

    	protected function sendConfirmationEmail($email, $confirmCode) {
    		
    		$config = $this->wire('config');
    		$confirmURL = $this->wire('page')->httpUrl() . "?register_confirm=" . urlencode($confirmCode);
    		
    		$mail = new WireMail();
    		$mail->subject(sprintf($this->_('Confirm account at %s'), $config->httpHost)); 
    		$mail->to($email);
    		$mail->from('noreply@domain.com');

     

  6. On 8/8/2020 at 9:41 PM, MoritzLost said:

    Have you made sure that the pagination option is active in both templates you need it in?

    Confirmed. 

     

    On 8/8/2020 at 9:41 PM, MoritzLost said:

    Other than that ... maybe calling renderPager() twice is tripping something up? Maybe save the result in a variable and output that instead.

    You're talking about the $pages->find? 

    On 8/8/2020 at 9:41 PM, MoritzLost said:

    And again, have you made sure there's no caching active on any layers?

    Sorry kinda lost on this. Though I made sure by clearing the cache also forcing the refresh Ctrl+Shift+r

  7.   <?php
      $newcolors = array();
      $confabulations = $pages->find( "template=confabulation, limit=5, sort=-id" );
      ?>
      <div class="pagination"><?php echo $confabulations->renderPager();?>
        <div style="clear:both;"></div>
      </div>
      <?php
      foreach ( $confabulations as $i ) {
        $newid = intval( $i->id ) - $basepageid;
        $newcolors = genColor();
        // $newcolors [0] = background 
        // $newcolors [1] = flap 
        // $newcolors [2] = text
    
    
        echo "<div class=\"post " . $newcolors[ 2 ] . "\" style=\"background-color:#" . $newcolors[ 0 ] . ";\">"
        . "<a href=\"" . $i->url . "\"><div class=\"flap\" style=\"background-color: #" . $newcolors[ 1 ] . "; color: #" . $newcolors[ 0 ] . "\">"
        . $newid . "</div></a>"
        . "<h2>" . $i->title . "</h2>" . $i->confabulation_body . "<div class=\"author\">" . $i->confabulation_pseudonym . "</div>
    						<div style=\"clear:both;\"></div></div>";
      }
    
    
      ?>
      <div class="pagination"><?php echo $confabulations->renderPager();?>
        <div style="clear:both;"></div>
      </div>

     

  8. Hi all. 

    Playing around with Processwire and wrapping my brain around the basic stuff. So far so good, until I hit on a field in my page where the output is "InputfieldText" which ought not to be.

    Let me explain my workspace:

    The Template
    I have a template with the following structure: 

    • Title
    • Confabulation_Body (Text area)
    • Confabulation_Pseudonym (Text)

    Output Pages
    I have two output pages: (1) All pages I created and (2) everyone's pages. 

    All pages I created looks like this: (which is btw the correct output) 
    image.thumb.png.cd4e58dad903d94e618f3108580052e0.png

    			$newcolors = array() ; 
    			$confabulations = $pages->find("template=confabulation, limit=5; created_users_id=$currUser"); 
    			foreach ($confabulations as $i) {
    				$newid = intval($i->id) - $basepageid;
    				$newcolors = genColor();
    			
    				echo "<div class=\"post ". $newcolors[2]. "\" style=\"background-color:#". $newcolors[0] .";\">"
    			 			. "<a href=\"". $i->url ."\"><div class=\"flap\" style=\"background-color: #". $newcolors[1] ."; color: #". $newcolors[0] ."\">"
    						. $newid ."</div></a>"
    						."<h2>".$i->title."</h2>".$i->confabulation_body."<div class=\"author\">".$i->confabulation_pseudonym ."</div>
    						<div style=\"clear:both;\"></div></div>"; 
    			}

    While the page to show Everyone's pages : 
    Note the InputFieldText

    		<?php 
    			// Echo all posts 
    			$newcolors = array() ; 
    			$confabulations = $pages->find(" id>1018, template=confabulation, sort=-id, limit=5"); 
    			foreach ($confabulations as $i) {
    				$newid = intval($i->id) - $basepageid;
    				$newcolors = genColor();
    				// $newcolors [0] = background 
    				// $newcolors [1] = flap 
    				// $newcolors [2] = text
    
    				echo "<div class=\"post ". $newcolors[2]. "\" style=\"background-color:#". $newcolors[0] .";\">"
    			 			. "<a href=\"". $i->url ."\"><div class=\"flap\" style=\"background-color: #". $newcolors[1] ."; color: #". $newcolors[0] ."\">"
    						. $newid ."</div></a>"
    						."<h2>".$i->title."</h2>".$i->confabulation_body ."<div class=\"author\">".$i->confabulation_pseudonym ."</div>
    						<div style=\"clear:both;\"></div></div>"; 
    			}
    			
    			
    		?>

    The Environment
    My environment (in case though theoretically it should work fine still): 

    • Latest version of XAMPP
    • Editor Tool: Dreamweaver

    Has anyone experienced such a bizarre behavior? Did I do something wrong? Is my laptop cursed? 

  9. Hi all, 

    Using the Pager to do some pagination. The render seems to work nicely - render meaning to print 1, 2, 3, next. 

    But upon clicking the links, the page does redirect but the results is as good as clicking on the # link. 

    Results are not moving to the next set. Noted that it happens that it behaves nicely but most of the time the results won't move. 

    Any idea where I went wrong? 

    <h1><?php echo $page->title; ?></h1>
    		<?php if($page->editable()) echo "<p><a href='$page->editURL'>Edit</a></p>"; ?>
    		<?php echo $page->body; ?>
    			
    		<?php 
    			// Declare variables
    			$newcolors = array() ; 
    			$confabulations = $pages->find("start=0, id>1018, template=confabulation, sort=-id, limit=5"); 
    			foreach ($confabulations as $i) {
    				..... Some design work and output ... 
    			}
    	
    		?>
    			<div class="pagination"><?php echo $confabulations->renderPager();?> </div>

    Added start=0 into the selector but nothing seems to happen. 

    Help

×
×
  • Create New...