Jump to content

Search the Community

Showing results for tags 'include processwire'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • Welcome to ProcessWire
    • News & Announcements
    • Showcase
    • Wishlist & Roadmap
  • Community Support
    • Getting Started
    • Tutorials
    • FAQs
    • General Support
    • API & Templates
    • Modules/Plugins
    • Themes and Profiles
    • Multi-Language Support
    • Security
    • Jobs
  • Off Topic
    • Pub
    • Dev Talk

Product Groups

  • Form Builder
  • ProFields
  • ProCache
  • ProMailer
  • Login Register Pro
  • ProDrafts
  • ListerPro
  • ProDevTools
  • Likes
  • Custom Development

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


AIM


MSN


Website URL


ICQ


Yahoo


Jabber


Skype


Location


Interests

Found 1 result

  1. Hi, I figured out a strange problem and don't know where to search for the error: I'm trying to include Processwire into an old website project in order to use PW for a little news-system . Therefore I'm using this code. <?php namespace ProcessWire; /*Include ProcessWire f. News */ include $_SERVER['DOCUMENT_ROOT'].("/cms/index.php"); /* Set news variable to get news from PW */ $news = wire('pages')->find('template=news-page');?> Now I'm able to loop through the news and display them as I want to be. <?php /* Section - Aktuelles */ if(count($news)) { ?> <div id="aktuelles" class="section-wrapper section-std-padding container activateMenu"> <h2 class="sectionhead">Aktuelles</h2> <?php foreach ($news as $n) { ?> <div class="box big-image"> <div class="two-text-columns"> <div> <a href="<?php echo ("/cms" .$n->sing_img->url .$n->sing_img);?>" class="img-popup"><img src="<?php echo ("/cms" .$n->sing_img->url .$n->sing_img);?>" class="left" alt="<?php echo $n->sing_img->description;?>" title="<?php echo $n->sing_img->description;?>" style="width: 100%;"></a> </div> <div> <h2><?php echo $n->title;?></h2> <?php echo $n->body;?> </div> </div> </div> <?php }; ?> </div> <?php }; ?> These are the settings for the image field $sing_img And here's the strange thing happening when I try to echo the image: $n->sing_img->url = /cms/site/assets/files/1019/ $n->sing_img = filename.jpg $n->sing_img->size(200,200) = INTERNAL SERVER ERROR Fehler: Uncaught ProcessWire\WireException: Method Pageimages::size does not exist or is not callable in this context in /.../cms/wire/core/Wire.php:519 Stack trace: #0 /.../cms/wire/core/WireArray.php(2212): ProcessWire\Wire->___callUnknown('size', Array) #1 .../cms/wire/core/Wire.php(386): ProcessWire\WireArray->___callUnknown('size', Array) #2 /.../cms/wire/core/WireHooks.php(698): ProcessWire\Wire->_callMethod('___callUnknown', Array) #3 /.../cms/wire/core/Wire.php(442): ProcessWire\WireHooks->runHooks(Object(ProcessWire\Pageimages), 'callUnknown', Array) #4 /.../cms/wire/core/Wire.php(445): ProcessWire\Wire->__call('callUnknown', Array) #5 /.../index.php(120): ProcessWire\Wire->__call('size', Array) #6 {main} thro (Zeile 519 in h.../cms/wire/core/Wire.php) I've no idea why this is happening, perhaps someone of you can give me a hint! Many greets, Jens alias DV-JF
×
×
  • Create New...