Custom Pages

Started by Robbo_, February 27, 2009, 09:59:39 AM

Previous topic - Next topic

tfs

I installed CustomPages 1.07, and it was working when I tested it a few days ago.  But now I can't get it to work.  I have one page that worked when I first installed called test01, and I used to be able to see it.  Now when I try to view that page it just goes to the home page and acts like CustomPages is not there at all.

I'm running SMF 2/RC1 and using the default theme only.  Since installing CustomPages I installed AjaxChat Integration 3.0

Now when I try to add a page it won't save anything in the Page Body.  If I preview the page it comes up empty and I get a message that says "You need to fill out the Page Body", and if I try to save it I get the same message.  In either case whatever text I've entered into the body disappears and the page won't save.

So I thought I'd uninstall it, but when running the uninstall I get...

5. Execute Modification ./Sources/Who.php Test failed
  1. Replace ./Sources/Who.php Test failed
  2. Replace ./Sources/Who.php Test successful

Any suggestions?
A good tree cannot bring forth evil fruit, neither can an evil tree bring forth good fruit.

Robbo_

#41
Quote from: willerby on March 15, 2009, 07:22:38 PM
I have a member group that the admin panel refuse to accept - I check it to allow access to a page but it never includes it - although it includes all others selected.

If I select just that member group I get the 'must include a permission' error.

Am I missing a separate permission somewhere to allow this group access? If not, appears to be a bug somewhere...



I have looked into this and can't replicate the issues. What is the name of the membergroup you are trying to add?

Quote from: tfs on March 19, 2009, 09:56:59 PM
I installed CustomPages 1.07, and it was working when I tested it a few days ago.  But now I can't get it to work.  I have one page that worked when I first installed called test01, and I used to be able to see it.  Now when I try to view that page it just goes to the home page and acts like CustomPages is not there at all.

I'm running SMF 2/RC1 and using the default theme only.  Since installing CustomPages I installed AjaxChat Integration 3.0

Now when I try to add a page it won't save anything in the Page Body.  If I preview the page it comes up empty and I get a message that says "You need to fill out the Page Body", and if I try to save it I get the same message.  In either case whatever text I've entered into the body disappears and the page won't save.

So I thought I'd uninstall it, but when running the uninstall I get...

5. Execute Modification ./Sources/Who.php Test failed
  1. Replace ./Sources/Who.php Test failed
  2. Replace ./Sources/Who.php Test successful

Any suggestions?

Sounds to me lik the AjaxChat Integration 3.0 has broken the installation when it comes to the installation errors.

When someone doesn't have permission to view a certain page they are sent to the home page. When you go to view the page does the URL contain action=page or is it just your home page URL?

With the body issues I can't think of anything that could cause that issue with or without other mods as it is all handled by CustomPages files. Have you tried using both the HTML and BBCode editors?

I have been working on the next version which I am just about to start packaging. Upgrading to this version through the package manager should solve the body not being filled out issue however it may or may not fix the other issues.

EDIT: I just looked through the AjaxChat Integration mod and it shouldn't cause any conflicts with the changes mt mod makes. I guess you will just have to wait until I get the new version packaged and see if that helps. Also check if there is anything in your error log.
Aus-Newerth

Quote from: IRC
Roph> I just finished a double 1/2lb cheese, bacon & salad beef burger
Roph> no woman on earth could satisfy me as much as I am satisfied right now by this burger
... later on ...
Roph> how could ensie go about satisfying me =o
<Ensiferous> Roph: Merely looking at me would yield far more pleasure than a burger can provide.

tfs

QuoteWhen someone doesn't have permission to view a certain page they are sent to the home page. When you go to view the page does the URL contain action=page or is it just your home page URL?

The Custom Pages link points to http://xxxx.xxxxx.com/forum/index.php?action=page;sa=test01, but when I try to go to that link it immediately sends me to http://xxxx.xxxxx.com/forum/index.php.  I'm logged in as admin.

Two things from the error log, each showing up several times today.

The first from Custom Pages...

admin   Today at 05:26:25 PM 
xx.xx.xx.xx     9ff82346ca023e0225e78b01b0a079a8 
   Type of error: Undefined 
http://xxxx.xxxxx.com/forum/index.php?action=admin;area=pages;sa=edit;pid=test01 
8: Undefined variable: perms
File: /var/www/xxxx/forum/Sources/ManagePages.php
Line: 256


Line 256 of ManagePages.php has the following...
if($perms == 'error')


The second interesting error is from Simple Portal.

admin   Today at 05:24:43 PM 
xx.xx.xx.xx     9ff82346ca023e0225e78b01b0a079a8 
   Type of error: Undefined 
http://xxxx.xxxxx.com/forum/index.php
8: Undefined index: DESCRIPTION
File: /var/www/xxxx/forum/Sources/SPortal2.php
Line: 2047



Line 2047 of SPortal2.php has the following...
echo '<em>', $rss_data['DESCRIPTION'], '</em><br />';

QuoteWith the body issues I can't think of anything that could cause that issue with or without other mods as it is all handled by CustomPages files. Have you tried using both the HTML and BBCode editors?

Yes, they both act the same way.





A good tree cannot bring forth evil fruit, neither can an evil tree bring forth good fruit.

tfs

QuoteThe second interesting error is from Simple Portal.

I figured that one out from a post on their forum.  It was because of an RSS feed I had created today.
A good tree cannot bring forth evil fruit, neither can an evil tree bring forth good fruit.

Robbo_

Quote from: tfs on March 19, 2009, 11:51:08 PM
The Custom Pages link points to http://xxxx.xxxxx.com/forum/index.php?action=page;sa=test01, but when I try to go to that link it immediately sends me to http://xxxx.xxxxx.com/forum/index.php.  I'm logged in as admin.
This means it thinks you don't have permission to view the page. In the current version admin can't see all pages, there are some which are restricted. Next version fixes this. The other problem might be with loading the page as if that fails it will also redirect to the main page.

Quote from: tfs on March 19, 2009, 11:51:08 PM
Two things from the error log, each showing up several times today.
The first error has been fixed in the next version and is unrelated to your problems.

The second error was related to showing the RSS feeds block in Simple Portal and I am guessing is fixed in the next version as it has a new RSS block (one your using is kinda hacky).

For the time being you should be able to use a HTML Simple Portal block to show your custom page. Hopefully my next version will fix your problems.

Also do you have any other mods installed?
Aus-Newerth

Quote from: IRC
Roph> I just finished a double 1/2lb cheese, bacon & salad beef burger
Roph> no woman on earth could satisfy me as much as I am satisfied right now by this burger
... later on ...
Roph> how could ensie go about satisfying me =o
<Ensiferous> Roph: Merely looking at me would yield far more pleasure than a burger can provide.

tfs

QuoteAlso do you have any other mods installed?

1. eNinja - Custom Pages 1.0.7
2. SMF Quiz 1.0.3
3. Cristalab Icon Set 1.0
4. AjaxChat Integration 3.0
5. SimplePortal 2.1.1
6. SMF Media Gallery 1.5.5
A good tree cannot bring forth evil fruit, neither can an evil tree bring forth good fruit.

tfs

QuoteThis means it thinks you don't have permission to view the page. In the current version admin can't see all pages, there are some which are restricted. Next version fixes this.

You're right.  When I change the permissions on the page (the one I created a few days ago "test01") to "everyone", I can now see the page.  All it says is "Test test test", and I'm still unable to modify the content of the page, nor can I add a new one, but I can at least see it.  Hopefully a new release will get me fixed up.
A good tree cannot bring forth evil fruit, neither can an evil tree bring forth good fruit.

Robbo_

#47
Version 1.0.9
    - Quick fix for version 1.0.8

Version 1.0.8
     - Fixed a problem with editing pages not remembering the permissions set when previewing your page
     - HTML editor now uses text variables properly
     - Added the rest of functionality to the HTML editor so it is just like the BBCode one except for 'remove formatting', 'toggle view' and smilies which will not be added
     - Changed how the page list is viewed so that lots of permissions or long URLs will not deface the page
     - Other small fixes
Aus-Newerth

Quote from: IRC
Roph> I just finished a double 1/2lb cheese, bacon & salad beef burger
Roph> no woman on earth could satisfy me as much as I am satisfied right now by this burger
... later on ...
Roph> how could ensie go about satisfying me =o
<Ensiferous> Roph: Merely looking at me would yield far more pleasure than a burger can provide.

tfs

I still get a "You need to fill out the Page Body" whenever I try to create a new page.  It refuses  to save any text that i put in the editor.  1.08
A good tree cannot bring forth evil fruit, neither can an evil tree bring forth good fruit.

tfs

Quote from: tfs on March 20, 2009, 03:21:31 AM
I still get a "You need to fill out the Page Body" whenever I try to create a new page.  It refuses  to save any text that i put in the editor.  1.08

Same with 1.09
A good tree cannot bring forth evil fruit, neither can an evil tree bring forth good fruit.

KahneFan

Great mod. Installed on 2.0RC1 and works well. Manually added a tab to my top menu (see "Extras" tab)


If you ever do look at creating a tab, you could (maybe) make it easier on your self by only making 1 main menu tab, which the admin can name, and the create the pages within kind of like Bakers Dozen does. Maybe it wouldn't be easier... I don't know.
#eric_on_twit| (video) Creating Themes for SMF | Reset Your Forum
NOTE: No PM's for support please.

Robbo_

Quote from: tfs on March 20, 2009, 03:24:32 AM
Quote from: tfs on March 20, 2009, 03:21:31 AM
I still get a "You need to fill out the Page Body" whenever I try to create a new page.  It refuses  to save any text that i put in the editor.  1.08

Same with 1.09
See if it will let you uninstall properly now. If it doesn't then maybe we should have a chat on IRC about it.

Quote from: KahneFan on March 20, 2009, 03:38:50 AM
Great mod. Installed on 2.0RC1 and works well. Manually added a tab to my top menu (see "Extras" tab)


If you ever do look at creating a tab, you could (maybe) make it easier on your self by only making 1 main menu tab, which the admin can name, and the create the pages within kind of like Bakers Dozen does. Maybe it wouldn't be easier... I don't know.
My next mod will go hand in hand with this one so that you can customize your sites links however you want to link to any custom pages. It will most likely be called Custom Links. Might make a custom home page mod for people who don't want to use a whole porta (or just add it to this mod). I wonder if there is any other mods I can make with 'Custom' in the name... custom... ummm.. text?  :p

Btw next version probably won't be up for at least a month and will hopefully include SMF 1.x support.
Aus-Newerth

Quote from: IRC
Roph> I just finished a double 1/2lb cheese, bacon & salad beef burger
Roph> no woman on earth could satisfy me as much as I am satisfied right now by this burger
... later on ...
Roph> how could ensie go about satisfying me =o
<Ensiferous> Roph: Merely looking at me would yield far more pleasure than a burger can provide.

6aro

Quote from: tfs on March 20, 2009, 03:24:32 AM
Quote from: tfs on March 20, 2009, 03:21:31 AM
I still get a "You need to fill out the Page Body" whenever I try to create a new page.  It refuses  to save any text that i put in the editor.  1.08

Same with 1.09

I have this error too!

Eclipse16V

I have this error too!
I worked with:
SMF 2 in German

Shop:
SID Giessen

tfs

Quote from: Robbo_ on March 20, 2009, 06:15:22 AM
See if it will let you uninstall properly now. If it doesn't then maybe we should have a chat on IRC about it.

Still the same error on the first instance of "Who.php"...


5. Execute Modification ./Sources/Who.php Test failed
  1. Replace ./Sources/Who.php Test failed

Find:
function determineActions($urls, $preferred_prefix = false)
{
global $txt, $user_info, $modSettings, $smcFunc, $context, $sourcedir;


Replace:
function determineActions($urls, $preferred_prefix = false)
{
global $txt, $user_info, $modSettings, $smcFunc, $context


After some investigation.... FOUND IT!  The problem is SMFQuiz.  It has split the two lines you're looking for.  See here...

function determineActions($urls, $preferred_prefix = false)
{ // SMFQuiz start
loadLanguage('SMFQuiz');
// SMFQuiz end
// SMFQuiz start
global $settings, $scripturl;
// SMFQuiz end

global $txt, $user_info, $modSettings, $smcFunc, $context, $sourcedir;


Of course, that means I've found the uninstall issue, but is this the same thing that breaks the inability to create or edit a new Custom Page?
A good tree cannot bring forth evil fruit, neither can an evil tree bring forth good fruit.

tfs

Some FUP... I ran the uninstall (allowing the error) and then edited Who.php by hand to remove ", $sourcedir" from the one line affected.  Of course when trying to run a reinstall of Custom Pages I get the same warning, because of the SMFQuiz items that have been inserted at the same position you are looking for in the replace.

So, as a note of interest, it would appear that Custom Pages and SMFQuiz are not compatible.

There ought to be a database to store this information, regarding incompatible mods.  Perhaps there is?
A good tree cannot bring forth evil fruit, neither can an evil tree bring forth good fruit.

Xavi-Nena

I cannot wait until the next version comes out...im so dying to have it work with 1.1.8

Robbo_

#57
Quote from: 6aro on March 20, 2009, 07:18:23 AM
Quote from: tfs on March 20, 2009, 03:24:32 AM
Quote from: tfs on March 20, 2009, 03:21:31 AM
I still get a "You need to fill out the Page Body" whenever I try to create a new page.  It refuses  to save any text that i put in the editor.  1.08

Same with 1.09

I have this error too!
Can everyone with this error please post what mods they have installed.

Quote from: tfs on March 20, 2009, 01:10:16 PM
Some FUP... I ran the uninstall (allowing the error) and then edited Who.php by hand to remove ", $sourcedir" from the one line affected.  Of course when trying to run a reinstall of Custom Pages I get the same warning, because of the SMFQuiz items that have been inserted at the same position you are looking for in the replace.

So, as a note of interest, it would appear that Custom Pages and SMFQuiz are not compatible.

There ought to be a database to store this information, regarding incompatible mods.  Perhaps there is?
To reinstall simple put the global back how it was before (add $sourcedir). Next version I will sort out the compatibility issues with that mod.

The chances are that even when you reinstall it won't work as other people are now reporting the same issue. Hopefully I will track it down today. If I could reproduce it I would have had it fixed long ago :/


EDIT: I have found the problem and the reason it wasn't happening to everyone. A temporary workaround until I get a fix up is to click the (Toggle View) button so that you are editing the page without previewing what it looks like ie []text (minus the ) instead of text.
Aus-Newerth

Quote from: IRC
Roph> I just finished a double 1/2lb cheese, bacon & salad beef burger
Roph> no woman on earth could satisfy me as much as I am satisfied right now by this burger
... later on ...
Roph> how could ensie go about satisfying me =o
<Ensiferous> Roph: Merely looking at me would yield far more pleasure than a burger can provide.

Robbo_

Version 1.0.10
    - Disabled the WYSIWYG features of the BBCode editor as it was causing problems
Aus-Newerth

Quote from: IRC
Roph> I just finished a double 1/2lb cheese, bacon & salad beef burger
Roph> no woman on earth could satisfy me as much as I am satisfied right now by this burger
... later on ...
Roph> how could ensie go about satisfying me =o
<Ensiferous> Roph: Merely looking at me would yield far more pleasure than a burger can provide.

6aro

Now, everything is fine.    Thanks!

Advertisement: