Re: [campsite-dev] Campsite-3.0.0-beta2: Inserting images fails
  • hi Peter!
    i havent been able to reproduce this error, i could insert images
    without any problem in two different campsite installations.

    campsite_constants.php is included at admin.php which is the main file
    for every administration task.

    anyway, i will try to find what is going on, so please send us some
    more details on this if any, thanks a lot.



    On Dec 24, 2007 1:48 AM, wrote:
    > When editing an article, I tried to insert an image
  • 4 Comments sorted by
  • Thanks Holman

    I'm a newbee campsite user, so Your Mileage May Vary! With the
    installer I chose to install the sample site that was offered, so this
    was my starting point. I do notice the following things about my
    installation - perhaps some of these might provide clues:

    I do not have any images for any of the articles. When I look at the
    image archive the database lists 68 images but all the thumbnails are
    shown as "not available" red crosses. I did try to track where the
    images should physically be stored and found none, so I assumed that the
    imagearchive had not been properly shipped with the beta, and my images
    folder is empty. (if you'd like to tar and put the images folder to
    go with the sample site somewhere where I could download it, it would be
    useful.)

    Then when I tried to add my own images - this is what the bug report was
    about. Uploading and saving the new images in the archive looked 100%
    fine, and my new uploads appear, with thumbnails, when I browse the
    archive.

    To put the image into the article when editing the article body (using
    xihna, I guess) I click on the image insert/edit icon in the editor
    toolbar. So the xihna editor somehow dispatches or binds that button to
    a thing that pops up a dialog (in the popup.jpg attached to this
    message...) But this on only how it works *after* I made the change in
    my "fix", by re-included the constants.

    Before I made the change, xihna somehow seemed to pop up the dialog with
    the constants not properly set or included (message below in the bug
    report).

    So without knowing the code too well, perhaps invoking this includeimage
    popup via the xihna editor somehow neglect to force the proper
    initialization and loading of admin.php.

    --

    There is a secondary problem that may be relevant too, which I haven't
    looked for yet. Once I included the constants, the image appears
    in-line in my article while I am in admin-mode. But it doesn't appear
    on the site that the user sees. When I go to the user page - the
    publication - and investigate by looking into the source for the page, I
    see this ...

    If you could shrink yourself smaller
    than a dust mite and explore the innards of a modern car you would
    discover some amazing microscopic machines. Carefully etched out of
    silicon wafers are microscale 70"> accelerometers to trigger airbags, gyroscopes to detect and correct
    dangerous yaw and pressure sensors to monitor tyre inflation.


    In other words, the image appears only as an html comment. Now perhaps
    I need a special template to make images appear, so perhaps this is
    "intended behavior". Or perhaps this indicates that some further level
    of rewriting or preprocessing should still have been applied to resolve
    the comment to a proper reference to an image. Do you know what this
    is about, and whether it looks related to my original bug report.


    I hope my info helps rather than muddies the situation.

    Regards

    Peter







    -----Original Message-----
    From: Holman Romero [mailto:holman.romero@gmail.com]
    Sent: 26 December 2007 06:20 AM
    To: campsite-dev@campware.org
    Subject: Re: [campsite-dev] Campsite-3.0.0-beta2: Inserting images fails

    hi Peter!
    i havent been able to reproduce this error, i could insert images
    without any problem in two different campsite installations.

    campsite_constants.php is included at admin.php which is the main file
    for every administration task.

    anyway, i will try to find what is going on, so please send us some
    more details on this if any, thanks a lot.



    On Dec 24, 2007 1:48 AM, wrote:
    > When editing an article, I tried to insert an image... This fails
    like this...
    >
    > Warning: require_once(File.php) [function.require-once]: failed to
    open stream: No such file or directory in
    /var/www/campsite/html/admin-files/localizer/Localizer.php on line 12
    >
    > Fatal error: require_once() [function.require]: Failed opening
    required 'File.php'
    (include_path='CS_PATH_PEAR_LOCAL:.:/usr/share/php:/usr/share/pear') in
    /var/www/campsite/html/admin-files/localizer/Localizer.php on line 12
    >
    > Apparently the php files are not being found because the constants
    were not defined when the php path was set up: so CS_PATH_PEAR_LOCAL
    did not get properly expanded to its value like it should have.
    >
    > My workaround (but this may not be correct if the
    conf/configuration.php file is auto-generated during setup) was to add a
    line
    >
    >
    require_once($_SERVER['DOCUMENT_ROOT'].'/include/campsite_constants.php'
    );
    >
    > at around line 14 (before the line to set the include path) in the
    file conf/configuration.php
    > -
    > Peter
    >



    --
    /holman

  • Hi Peter,

    Regarding the second issue - the image display on the frontend - are you
    sure you installed beta2? The image display in the frontend was not
    implemented in beta1, that's why you didn't see them and it was displaying a
    text like: 70">

    The beta 2 release processes this tag and prints the image link instead.
    Please make sure you installed beta 2 properly, over the old beta 1 install
    or in a new virtual host.

    Regards,
    Mugur

    On Dec 26, 2007 4:31 PM, Peter Wentworth wrote:

    > Thanks Holman
    >
    > I'm a newbee campsite user, so Your Mileage May Vary! With the
    > installer I chose to install the sample site that was offered, so this
    > was my starting point. I do notice the following things about my
    > installation - perhaps some of these might provide clues:
    >
    > I do not have any images for any of the articles. When I look at the
    > image archive the database lists 68 images but all the thumbnails are
    > shown as "not available" red crosses. I did try to track where the
    > images should physically be stored and found none, so I assumed that the
    > imagearchive had not been properly shipped with the beta, and my images
    > folder is empty. (if you'd like to tar and put the images folder to
    > go with the sample site somewhere where I could download it, it would be
    > useful.)
    >
    > Then when I tried to add my own images - this is what the bug report was
    > about. Uploading and saving the new images in the archive looked 100%
    > fine, and my new uploads appear, with thumbnails, when I browse the
    > archive.
    >
    > To put the image into the article when editing the article body (using
    > xihna, I guess) I click on the image insert/edit icon in the editor
    > toolbar. So the xihna editor somehow dispatches or binds that button to
    > a thing that pops up a dialog (in the popup.jpg attached to this
    > message...) But this on only how it works *after* I made the change in
    > my "fix", by re-included the constants.
    >
    > Before I made the change, xihna somehow seemed to pop up the dialog with
    > the constants not properly set or included (message below in the bug
    > report).
    >
    > So without knowing the code too well, perhaps invoking this includeimage
    > popup via the xihna editor somehow neglect to force the proper
    > initialization and loading of admin.php.
    >
    > --
    >
    > There is a secondary problem that may be relevant too, which I haven't
    > looked for yet. Once I included the constants, the image appears
    > in-line in my article while I am in admin-mode. But it doesn't appear
    > on the site that the user sees. When I go to the user page - the
    > publication - and investigate by looking into the source for the page, I
    > see this ...
    >
    >

    If you could shrink yourself smaller
    > than a dust mite and explore the innards of a modern car you would
    > discover some amazing microscopic machines. Carefully etched out of
    > silicon wafers are microscale > 70"> accelerometers to trigger airbags, gyroscopes to detect and correct
    > dangerous yaw and pressure sensors to monitor tyre inflation.

    >
    > In other words, the image appears only as an html comment. Now perhaps
    > I need a special template to make images appear, so perhaps this is
    > "intended behavior". Or perhaps this indicates that some further level
    > of rewriting or preprocessing should still have been applied to resolve
    > the comment to a proper reference to an image. Do you know what this
    > is about, and whether it looks related to my original bug report.
    >
    >
    > I hope my info helps rather than muddies the situation.
    >
    > Regards
    >
    > Peter
    >
    >
    >
    >
    >
    >
    >
    > -----Original Message-----
    > From: Holman Romero [mailto:holman.romero@gmail.com]
    > Sent: 26 December 2007 06:20 AM
    > To: campsite-dev@campware.org
    > Subject: Re: [campsite-dev] Campsite-3.0.0-beta2: Inserting images fails
    >
    > hi Peter!
    > i havent been able to reproduce this error, i could insert images
    > without any problem in two different campsite installations.
    >
    > campsite_constants.php is included at admin.php which is the main file
    > for every administration task.
    >
    > anyway, i will try to find what is going on, so please send us some
    > more details on this if any, thanks a lot.
    >
    >
    >
    > On Dec 24, 2007 1:48 AM, wrote:
    > > When editing an article, I tried to insert an image... This fails
    > like this...
    > >
    > > Warning: require_once(File.php) [function.require-once]: failed to
    > open stream: No such file or directory in
    > /var/www/campsite/html/admin-files/localizer/Localizer.php on line 12
    > >
    > > Fatal error: require_once() [function.require]: Failed opening
    > required 'File.php'
    > (include_path='CS_PATH_PEAR_LOCAL:.:/usr/share/php:/usr/share/pear') in
    > /var/www/campsite/html/admin-files/localizer/Localizer.php on line 12
    > >
    > > Apparently the php files are not being found because the constants
    > were not defined when the php path was set up: so CS_PATH_PEAR_LOCAL
    > did not get properly expanded to its value like it should have.
    > >
    > > My workaround (but this may not be correct if the
    > conf/configuration.php file is auto-generated during setup) was to add a
    > line
    > >
    > >
    > require_once($_SERVER['DOCUMENT_ROOT'].'/include/campsite_constants.php'
    > );
    > >
    > > at around line 14 (before the line to set the include path) in the
    > file conf/configuration.php
    > > -
    > > Peter
    > >
    >
    >
    >
    > --
    > /holman
    >
    >

  • Hi Peter !

    events a) and b) were already fixed, just after your previous report.
    tomorrow i will take care of those other problems you reported and be
    back with news.

    thanks a lot for your input on this.



    On Dec 27, 2007 12:38 PM, Peter Wentworth wrote:
    >
    >
    >
    >
    >
    >
    > Hi Mugur
    >
    >
    >
    > I'm trying to check that what I report is helpful and accurate: so far my
    > sequence of events / issues is precisely the same.
    >
    >
    >
    > I started from a clean download, new virtual site, Ubuntu Gutsy Gibbon.
    > What I do new see is that the login page announces itself as beta 1. And
    > the beta 1 is in /template_engine/classes/CampVersion.php. This makes me
    > wonder if I got the right template_engine in the distro?
    >
    >
    >
    > I confirm the file campsite-3.0.0-beta2.tar.gz as 5138627 - this agrees
    > with what I see at
    > http://sourceforge.net/project/showfiles.php?group_idf936&package_ide091
    >
    >
    >
    > Also, if you grep the whole html folder, the string beta1 occurs in
    > install/sql/campsite_3_0_demo_data.sql too.
    >
    >
    >
    > Here is a manifest of /template_engine/classes/ as I untar it from the
    > archive delivered by sourceforge. Some of the dates do look like beta1
    > dates, so I'd like to know if any of these files are perhaps wrong versions
    > for beta-2:
    >
    >
    >
    > total 248
    >
    > -rw-r--r-- 1 www-data www-data 3285 2007-09-26 00:57
    > ArticleAttachmentsList.php
    >
    > -rw-r--r-- 1 www-data www-data 2882 2007-09-26 00:57
    > ArticleAudioAttachmentsList.php
    >
    > -rw-r--r-- 1 www-data www-data 4245 2007-10-16 12:08
    > ArticleCommentsList.php
    >
    > -rw-r--r-- 1 www-data www-data 2801 2007-09-26 00:57 ArticleImagesList.php
    >
    > -rw-r--r-- 1 www-data www-data 11165 2007-12-03 07:18 ArticlesList.php
    >
    > -rw-r--r-- 1 www-data www-data 2801 2007-09-26 00:57 ArticleTopicsList.php
    >
    > -rw-r--r-- 1 www-data www-data 3398 2007-10-29 22:09 CampConfig.php
    >
    > -rw-r--r-- 1 www-data www-data 20912 2007-12-22 23:34 CampContext.php
    >
    > -rw-r--r-- 1 www-data www-data 1912 2007-10-16 12:08 CampDatabase.php
    >
    > -rw-r--r-- 1 www-data www-data 4925 2007-11-26 05:20 CampGetImage.php
    >
    > -rw-r--r-- 1 www-data www-data 6425 2007-12-15 22:25 CampHTMLDocument.php
    >
    > -rw-r--r-- 1 www-data www-data 5027 2007-10-23 07:11 CampRequest.php
    >
    > -rw-r--r-- 1 www-data www-data 5073 2007-10-23 07:11 CampSession.php
    >
    > -rw-r--r-- 1 www-data www-data 5997 2007-12-20 16:22 CampSite.php
    >
    > -rw-r--r-- 1 www-data www-data 10454 2007-12-15 22:25 CampSystem.php
    >
    > -rw-r--r-- 1 www-data www-data 3067 2007-10-25 07:31 CampTemplate.php
    >
    > -rw-r--r-- 1 www-data www-data 16469 2007-12-20 16:22 CampURI.php
    >
    > -rw-r--r-- 1 www-data www-data 15418 2007-12-17 07:56 CampURIShortNames.php
    >
    > -rw-r--r-- 1 www-data www-data 14528 2007-12-20 16:22
    > CampURITemplatePath.php
    >
    > -rw-r--r-- 1 www-data www-data 2375 2007-10-23 07:11 CampVersion.php
    >
    > -rw-r--r-- 1 www-data www-data 1154 2007-09-07 20:13
    > ComparisonOperation.php
    >
    > -rw-r--r-- 1 www-data www-data 3043 2007-09-12 16:56 Exceptions.php
    >
    > -rw-r--r-- 1 www-data www-data 8762 2007-10-16 16:43 IssuesList.php
    >
    > -rw-r--r-- 1 www-data www-data 10752 2007-09-22 09:47 ListObject.php
    >
    > -rw-r--r-- 1 www-data www-data 6563 2007-12-15 22:25 Operator.php
    >
    > -rw-r--r-- 1 www-data www-data 4337 2007-10-29 22:09 SearchResultsList.php
    >
    > -rw-r--r-- 1 www-data www-data 5670 2007-10-16 12:08 SectionsList.php
    >
    > -rw-r--r-- 1 www-data www-data 2786 2007-12-22 23:34 SubtitlesList.php
    >
    > -rw-r--r-- 1 www-data www-data 2939 2007-09-26 00:57 SubtopicsList.php
    >
    > -rw-r--r-- 1 www-data www-data 2973 2007-12-22 23:34 SyntaxError.php
    >
    >
    >
    >
    >
    > My sequence of events is
    >
    > a) The install fails when I click next on the step just before finish