Topic Closed
ich
11 Posts

Hi,

in former versions of gpEasy (e.g. 2.3.3) the pages in data/_pages are stored with names what I've given (e.g. test.php). In the latest beta (2.4.b4) the names of page files are encrypted (e.g. kQNMXFn_u.php). What is the reason for such a change?

Thomas

 

8 years ago#3350

Sanne
9 Posts

I also wondered about that and would prefer the page title as file name. I'm sure there's a good reason for this change, but in case it's not too much hassle to have an option for the old file names, it would be nice to get them back.

gpEasy using files instead of a database is one reason why it's so attractive to me, because the content is easily accessible, human readable and editable, if needed. With the new file names it's much more inconvenient to find the right file, and it feels a bit as if I'm not as much in control anymore like before.

2.4b4 is great all in all though, I'm very grateful to be able to use and work with such a fine CMS.

Sanne

8 years ago#3354

Josh S.
2K Posts
285K Downloads
16 Themes
18 Plugins

Thomas, Sanne, anyone else reading,

I'm glad this was brought up, because it is a big change in 2.4 that may take some getting used to. Hopefully not too difficult to adjust to though. I'll give some tips on how to use the new data structure.

What is the reason for such a change?

There are a number of reasons.

  • Before, when a page was renamed, the data file would have to be renamed using php's rename() function, which did not work for all users. The new data structure allows for page renaming without having to rename the data file and make gpEasy more stable for more users.
  • Using a page's title for it's file name created some problems with international characters. Some systems handle international characters well, others didn't. This change makes international characters a non-issue for the file system.
  • One of the most requested features for gpEasy was the ability to create Hierarchical Permalinks. The new structure allows for page titles like "Parent/Child" to be renamed to "Parent-Child" and back to "Parent/Child/Grandchild" without even touching the data file or directories in the data structure.

in case it's not too much hassle to have an option for the old file names, it would be nice to get them back.

I hadn't thought of this before and it is theoretically possible to do... but let me just give a quick pointer for how to work with the new data files. Take a look at the Page Manager within your installation and pull up the Main Menu. The Page Options menu for every file has a new section title "Page Info" that includes files size, last modified time, data types and the Data Index. The Data Index directly correlates to the data file in the /data/_pages/  directory. For example, the kQNMXFn_u.php file Thomas referenced correlates to the page with the "u" data index. So to find the data file, you'll only ever need to know the data index.

I hope this is helpful. Let me know if you have any other questions or concerns about this change.

8 years ago#3368

Sanne
9 Posts

Hi Josh,

thanks for the explanation. Those are indeed important reasons for that change. I can also imagine that putting file naming in the hands of end users is a bit scary and may lead to a lot of problems and less maintainable code. So I can see why you did the change and appreciate that it's for the best.

With the "Page Info" section it's also much less hassle to find the right file, if needed. I can certainly live with that.

 

Thanks again

Sanne

8 years ago#3370

Josh S.
2K Posts
285K Downloads
16 Themes
18 Plugins

Thanks Sanne

Just to clarify one thing:

putting file naming in the hands of end users is a bit scary

Previous versions did clean page titles a bit before using them as file names, it just wasn't good enough.

8 years ago#3372

Charles S
448 Posts
13.7K Downloads
2 Themes
8 Plugins

Josh,

Thanks for pointing me to the right thread.

I don't know if this is correct or not however, in 2.4b4 the data index info for an old file (created in 2.3 or less that has a page slug as athe file name) will show a date index code though it doesn't have one in the file name as it was never re-named to the new 2.4+ naming convention.

e.g.
actual file name "As_A_Man_Thinketh.php"
data index: u

 

8 years ago#3378

Josh S.
2K Posts
285K Downloads
16 Themes
18 Plugins

That is correct.

The data index has been around for some time and every file, whether created in 2.3 or 2.4, has one. We just started using it for the data files in 2.4.

8 years ago#3379

Sanne
9 Posts

Previous versions did clean page titles a bit before using them as file names, it just wasn't good enough.

Ah, yes, I remember noticing some sensible changes from page title to file name before. But still better to have full control, I understand. All fine. :)

Edited: 8 years ago#3380

Charles S
448 Posts
13.7K Downloads
2 Themes
8 Plugins

Josh,

A thought came to mind, generally the only time I'm opening up files/pages is on the localhost, and I wonder if it is possible to put an option in the file menu to "open file with editor," at least on the localhost isntall?

Another thought, might it be better to put the file specific suffix in front as a prefix--this would make it easier to locate files quickly. So, instead of "FdGidEe_bi.php" we would have "bi_FdGidEe.php"--navigation to the file would just require typing "b" to get to the b files otherwise we have to hunt through all "FdGidEe_" = scroll and look. Kind of a minor thing, just an idea.

 

 

 

8 years ago#3386

Steev
47 Posts

Yeah. Not helpful to me. gpeasy is solely a localhost install for me and available only internally, to my co-workers. Part of the attrraction was being able to drop a DOC or XLS or PDF or whatever right into the appropriate subfolder of my htdocs directory and be done with it, gpeasy already using the file's human-understandable name. No uploading or anything else needed, just work on my source file, sync it with Synctoy, and forget about it. I can't make a judgment on the rationale behind the change except they seem to be valid reasons, but sitting at my desk the consequences are not helpful.

Edited: 8 years ago#3405

Josh S.
2K Posts
285K Downloads
16 Themes
18 Plugins

Steev,

Would an option to use the older file names be a good option for you then?

8 years ago#3411

Sanne
9 Posts

I for one would welcome such an option, after all. It *is* easier to see the page titles in the file names when working on the files directly.

Edited: 8 years ago#3418

Josh S.
2K Posts
285K Downloads
16 Themes
18 Plugins

Sounds good. I've added an option that can be set in the gpconfig.php file.

define('gp_index_filenames',true);

It defaults to true, but when set to false will use filenames that represent the name of the page. A cautionary note: setting it to false could prevent hierarchical permalinks from working.

8 years ago#3427

Sanne
9 Posts

Thanks you so much, Josh. Somehow I missed the notification of your post or I would have reacted sooner.

I'm checking 2.4RC2 with this setting set to false for the site I'm building right now. I'm swamped with work right now so it might be some days before I can report how it went, though.

Thanks again! I appreciate very much how you take user wishes into account for your development!

8 years ago#3523

Topic Closed

 

News

elFinder 2.1.50 in Upcoming Release
12/28/2019

A new release for Typesetter is in the works with a lot of improvements including the ... Read More

Typesetter 5.1
8/12/2017

Typesetter 5.1 is now available for download. 5.1 includes bug fixes, UI/UX improvements, ... Read More

More News

HH-Support

Company located in T├│rshavn, Faroe Islands. * Webpage Design * Consultant & Provider of a wide range of programs for visually impaired and dyslextics.

Find out more about our Provider Spotlight

Log In

  Register