Results 1 to 10 of 13

Hybrid View

  1. #1
    Join Date
    Sep 2003
    Location
    Ohio
    Posts
    69,402
    Plugin Contributions
    6

    Default Re: Define Page Editor changes having no effect

    First, test something ...

    Edit the: define_privacy.php

    Do you see the change in the Catalog?

    If you see that change, then it is your files that you cloned ...

    If you don't see that change, then it is something else moofed up ...
    Linda McGrath
    If you have to think ... you haven't been zenned ...

    Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!

    Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today!]
    Officially PayPal-Certified! Just click here

    Try our Zen Cart Recommended Services - Hosting, Payment and more ...
    Signup for our Announcements Forums to stay up to date on important changes and updates!

  2. #2
    Join Date
    Sep 2008
    Posts
    20
    Plugin Contributions
    0

    Default Re: Define Page Editor changes having no effect

    Hi,

    The editor works fine on the standard pages, that's what I would expect.

    I am new to zencart and have created my first new page, so it's no surprise that is where the fault is, I obviously haven't created the page correctly so that it is editable via admin.

    Given the two files I have mentioned (incidentally if delete the file tpl_findus_default, the page the editor is altering still doesn't show as the web page) I must have a problem with my files somewhere, the question is where and how do I fix it ?

    I wanted to create a new page (contains html to incorporate a google map) and ensure it is available in the admin page edit dropdown, so that the simple text parts of the page are easily editable for others.

    I just wanted to create a page which meets the following criteria:-

    1) I can place anything I want in it including PHP/HTML etc (ok)
    2) It can be linked to from other pages (ok)
    3) It is editable via the admin page editor dropdown (problem)

    Does anyone have any ideas ? - I would imagine this is a very basic and common requirement for new users.

  3. #3
    Join Date
    Sep 2003
    Location
    Ohio
    Posts
    69,402
    Plugin Contributions
    6

    Default Re: Define Page Editor changes having no effect

    Compare your files to the set for Page 2 ...

    Code:
    /includes/modules/pages/page_2/header_php.php
    /includes/templates/template_default/tpl_page_2_default.php
    /includes/languages/english/page_2.php
    /includes/languages/english/html_includes/define_page_2.php
    Check where you stored the defines for the new page, example for page 2 uses:
    define('FILENAME_DEFINE_PAGE_2', 'define_page_2');
    define('FILENAME_PAGE_2', 'page_2');
    Check for the activation key that controls the display, page 2 uses:
    DEFINE_PAGE_2_STATUS

    Watch for any typos ...

    I like Beyond Compare from scootersoftware.com for doing these kinds of comparisons ...

    The Developers Tool Kit is also helpful to locate what is on the server ...
    Linda McGrath
    If you have to think ... you haven't been zenned ...

    Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!

    Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today!]
    Officially PayPal-Certified! Just click here

    Try our Zen Cart Recommended Services - Hosting, Payment and more ...
    Signup for our Announcements Forums to stay up to date on important changes and updates!

  4. #4
    Join Date
    Sep 2008
    Posts
    20
    Plugin Contributions
    0

    Idea or Suggestion Re: Define Page Editor changes having no effect

    Hi,

    I found that the only reason my page looked ok in the browser was that I had put the actual page content into the file tpl_findus_default which I have now corrected.

    What happens now is that the web page shows no content, I think the reason must be that the line

    PHP Code:
     $define_page zen_get_file_directory(DIR_WS_LANGUAGES $_SESSION['language'] . '/html_includes/'FILENAME_DEFINE_FINDUS'false'); 
    is not pulling in the correct page for some reason

    I did find where constant FILENAME_DEFINE_FINDUS is defined and it's in includes/extra_datafiles/findus.php which is as I was told to do according to the guide at http://www.zen-cart.com/wiki/index.p...ting_new_pages

    The file define_findus.php contains some text and exists in both
    includes/languages/english/html includes and also
    includes/languages/english/html includes/MYTEMPLATE

    Something is still amiss somewhere, I notice there are no equivalents in the extra_datafiles directory for main_page, page_2 etc. which I thought was a bit odd.

    Any ideas ?

    Andy

  5. #5
    Join Date
    Sep 2008
    Posts
    20
    Plugin Contributions
    0

    Default Re: Define Page Editor changes having no effect

    I should have added the findus.php file in the includes/extra_datafiles directory simply contains:-

    PHP Code:
    define(FILENAME_FINDUS'findus'); 
    The above is as per the wiki guide, however as the constant FILENAME_DEFINE_FINDUS is used in the header.php file I also altered the FILENAME_FINDUS constant to read FILENAME_DEFINE_FINDUS, the difference when I changed this was I got a 404 error rather than simply no content.

  6. #6
    Join Date
    Sep 2008
    Posts
    20
    Plugin Contributions
    0

    Idea or Suggestion Re: Define Page Editor changes having no effect

    Hi,

    Thanks for the help, I've now managed to solve this.

    My problems where:-

    I initially placed textual content for the page in tpl_findus_default, instead of just copying what is in an existing page, e.g. tpl_page_2_default

    I then realised that to see the main content from the file in the html_includes directory the page status must be switched on via page status settings. When creating a new page the status is off by default, so you see no content.

    In summary if you want to create a new page and be able to edit it via the admin panel, I would recommend basing all files on page_2 (or any existing page really), the three steps involved can be summarised as:-

    1) Follow instructions at http://www.zen-cart.com/wiki/index.p...ting_new_pages
    2) Create content file at includes/languages/english/html_includes/YOURTEMPLATE/define_pagename.php
    3) Switch on the page using define page status section of the admin area, you must first insert a new entry in the configuration database or your new page will not show up in the define page status list, SQL required is

    Code:
    INSERT INTO `configuration` ( `configuration_title`, `configuration_key`, `configuration_value`,
    `configuration_description`, `configuration_group_id`, `sort_order`, `last_modified`, `date_added`, `use_function`,
    `set_function`)
    VALUES ('Define Page_5', 'DEFINE_PAGE_5_STATUS', '1', 'Enable the Defined Page 5 Link/Text?<br />0=
    Link ON, Define Text OFF<br />1= Link ON, Define Text ON<br />2= Link OFF, Define Text ON<br />3= Link
    OFF, Define Text OFF', 25, 100, NOW(), NOW(), NULL, 'zen_cfg_select_option(array(''0'', ''1'', ''2'', ''3''),');
    Change pagenames above, as appropriate

    Thanks,

    Andy

  7. #7
    Join Date
    Mar 2009
    Posts
    17
    Plugin Contributions
    0

    Default Re: Define Page Editor changes having no effect

    I can´t believe I´ve been grappling with this for DAYS!
    And how is a mere mortal supposed to figure out the SQL commands that Andy has found to solve this problem?

    Can someone tell me how to Quote : ¨you must first insert a new entry in the configuration database¨

    Is this done with MyPhpAdmin ?

 

 

Similar Threads

  1. v137 Stylesheet changes not having any effect
    By lewisasding in forum Templates, Stylesheets, Page Layout
    Replies: 1
    Last Post: 16 Mar 2013, 04:39 AM
  2. Define Pages Editor not saving changes
    By jharper in forum Templates, Stylesheets, Page Layout
    Replies: 3
    Last Post: 10 Jan 2009, 03:25 AM
  3. Changes in Define Pages Editor Won't Save
    By mattmueller in forum Templates, Stylesheets, Page Layout
    Replies: 10
    Last Post: 17 Nov 2007, 08:57 PM
  4. having probs with define pages editor
    By mikemoon in forum General Questions
    Replies: 2
    Last Post: 6 Apr 2007, 02:41 PM
  5. Define Pages Editor loses changes
    By GaryNick in forum Basic Configuration
    Replies: 3
    Last Post: 16 Nov 2006, 06:34 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg