Jump to content

Siddhi Jagtap

Members
  • Posts

    29
  • Joined

  • Last visited

Posts posted by Siddhi Jagtap

  1. 21 minutes ago, kongondo said:

    Yes. From your description, it sounds like you want you page to display differently depending on the view port (?) and/or device (?) it is being viewed on. In that case, you can accomplish that using CSS (apologies; I am not sure about your coding capabilities, so please, ignore me if you knew this already :-)) and JavaScript (most likely, optional).  On the other hand, if what you actually meant is you want ProcessWire to output different gallery page views depending on some condition, then the answer is a tentative yes. We'd need to know what that condition is first. Maybe you could explain your use case? My feeling though is that you are referring to client-side conditions as opposed to server-side.

    I basically want to output one view for our website and then use another view(without navbars and stuff) for our app. We will just be linking the URL of the second view to our app.

  2. Hello All,

    I am trying something here but I am not sure if its possible. I have a Gallery page(gallery.php) using the 'gallery' template. However I want two views of the Gallery page. One with the navbar and one without. Is it possible to use the same gallery page and make this work?

    Thanks in advance.

  3. 3 hours ago, JeevanisM said:

    Well, 

    I created the folder ' bhimon', then uploaded the PW zip file and extracted it. It will have a folder named processwire but I had to move everything outside of it, so that every files will be in the 'bhimon' folder. Then I called the installation such as http://www.jeevanism.com/bhimo

    this will start the installation and went everything good. I could access my website and my admin URL . 

     

    well, yes if your 'folder' name is 'test' then you will have to add that at the end of the URL. 

    please try to enable the debug mode on, so that you can see if there any errors. On the client side, check any errors happening in FireFox/Chrome developer console. 

    I finally managed to get this working. The mod rewrite for the Apache server had to be enabled and I could then log into the admin panel.

    Thanks a lot everyone for all the help. PW has an amazing community!

    • Thanks 1
  4. 10 hours ago, JeevanisM said:

    I dont understand this fully, but ideally, all your PW related files/folders should be inside that ' test ' only, if you want this website work in the subdomain way. If the website should be as the main domain, all your PW files should be the public_html folder (docroot), whichever the case, you should do this in the installation steps, not after that .

     

    to give you a clear understanding, below is my folder structure , bhimon is my subfolder where I installed my PW backup and website is accessed as 
    http://www.jeevanism.com/bhimon

    image.png.94684e854de1f1c95779c91a4ccfed11.png

    I will try doing a fresh install today and see if that works. Also if your website is http://www.jeevanism.com/bhimon, then you docroot is pointing towards the test folder yes? You would just add the bhimon after the domain address to access?

  5. 1 hour ago, JeevanisM said:

    If you open the .htaccess file, you can see a section like below 

    image.png.66201292a072e46b9596fae5c81f111c.png

    usually, the website should work straight away, but in you case, just try if you can add your subfolder name as rewrite base.

    Ok, so I tried adding some gibberish to the .htaccess file and my home page still loads without a 500 error. So maybe the server is not reading the htaccess file.

    My site folder is in the root directory it self. Do I still need to add anything to Rewrite base?

  6. 1 minute ago, JeevanisM said:

    ok, then I guess we need to check the .htaccess file. Is there any .htaccess file in root folder ? trying to meddle with the URL and root folder ? 

    and I migrated  one of my old PW site backup   as a subfolder to my main website, my admin URL go like this 

    https://mymainwebsite.com/subfoldername/adminname/  

    Ok so the admin panel url sounds about right. There is a .htaccess file in the root folder. What do I need to do with it?

  7. 1 minute ago, JeevanisM said:

     

    There is a quick dirty fix is to rename the exported folder name into ' site ', this will bypass the profile not found error. 

    Ok. So when I select that rename it and select the profiler, I run the installer like normal. And then after that would I need to move the site wire htaccess index.php out of the processwire folder to the document root. Would that work smoothly?

  8. 9 minutes ago, JeevanisM said:

    well, just for a testing, can you try to put a test  link using this 

     

    <?php echo $pages->get(1001)->url; ?> // where (1001) is the page ID, you can see this page ID from admin. 

    image.png.a6629d3782f71f9a1c2db5c6020205eb.png

    Tried this for the About page. The URL echoed is /about-us/ (which is what is set under admin for the about.php page). It takes me to www.mywebsite.com/about-us/ and gives me the URL not found on server error.

    Also another thing I observed that on the admin panel, when I click on View for the About page, it takes me to www.mywebsite.com/test/about-us and gives the same URL not found error. The 'test' folder is where the site dir, wire dir, .htaccess and index.php files are. Essentially that is the document root where the domain is pointing. However on the admin panel as you can see that folder name is still appearing after the domain address. Could this discrepancy causing all this? Just a guess, not sure.

    What should the admin URL be after migration? Does that change too?

    Thanks.

    • Like 1
  9. 17 minutes ago, JeevanisM said:

    how are you linking to the about page ?  can you put this below code in your home page and try clicking the link working or not ? 


     

       <!-- top navigation -->
        <ul class='topnav' role='navigation'><?php
    
            // top navigation consists of homepage and its visible children
            $homepage = $pages->get('/'); 
            $children = $homepage->children();
    
            // make 'home' the first item in the navigation
            $children->prepend($homepage); 
    
            // render an <li> for each top navigation item
            foreach($children as $child) {
                if($child->id == $page->rootParent->id) {
                    // this $child page is currently being viewed (or one of it's children/descendents)
                    // so we highlight it as the current page in the navigation
                    echo "<li class='current' aria-current='true'><span class='visually-hidden'>Current page: </span><a href='$child->url'>$child->title</a></li>";
                } else {
                    echo "<li><a href='$child->url'>$child->title</a></li>";
                }
            }
    
            // output an "Edit" link if this page happens to be editable by the current user
            if($page->editable()) {
                echo "<li class='edit'><a href='$page->editUrl'>Edit</a></li>";
            }
    
        ?></ul>

     

     

    and please check the about page has templates set and published and no permission issue 

     

    image.png.9efb8060bae30b7a878f98246228778c.png

    The about page is actually not a child of the homepage. They are independent of each other. I checked the above and the 'about' template has been set for the about.php page without any access issues. Also I am using stuff like <?php echo $page->about_us_img->url; ?> OR <?php echo $page->about_us_title; ?> to pull data. This is working fine on the dev server so I am not sure if it is still an issue with the code.

    When I am linking the pages, I have a navbar on the Homepage. It has an About Us section and I put the href value as ./about.php for example. It takes me to a page www.mywebsite.com/about.php and it is unable to find that URL on the server.

  10. 2 minutes ago, JeevanisM said:

    this is surely related to the file/folder permission issue. Please try clearing cache as well. 

    But I would like to suggest another way of moving PW work from dev machine to Production Live.  Once you finished the development, you can follow as below steps

    • install this module Profile Exporter for ProcessWire 2.5+ (  Admin => Module => New , then use the Module Class Name method )
    • upon successful installation Admin => Export Site Profile 
    • This will give you a form to give a name, title and image for the profile and lets you export into zip format
    • Upload this file into Production/Live server root (wherever you like to install  PW)
    • Upload the PW  Master version and extract it
    • Copy/Move your site profile backup file and extract it 
    • Now, you will have site profiles folders like site-classic, site-blank, and site-the-name-you-have-given
    • go to the installation URL and you choose your site-the-name-you-have-given from the menu and install it
    • this will import the database, files, assets and everything. 

    I hope this works for you. 

    I had initially tried using Profile Exporter following the same process as you mentioned. When I arrived at the installer and selected the site-the-name-you-have-given profile, it kept giving me an error saying ' Profile not found'. I ultimately gave up and did the migration manually.

    I actually am struggling post the migration now. I was able to map my website domain. The homepage.php file which is essentially my homepage opens on loading the domain(have included this file in my home.php file). However the server is unable to find any of the other pages. All of them are in the site/templates folder along with the homepage.php. But when I say add a link redirecting to ./about.php, the URL caught is www.mywebsite.com/about.php. This gives me a URL not found error. Also for most of the other pages, the data from the admin panel is not getting rendered. On some it does and on other it does not. It gives an error saying 'Trying to get property of non-object'. I am not sure what is going on and if I messed up with the migration.

     

    Other things I did:

    - whitelisted my domain in config.php

    -changed permissions of site/assets to read and write 

    -changed the owner of the site folder to the apache owner

     

    Any suggestions would really help.

    Thanks.

  11. Hello All,

    I recently migrated my processwire website from dev server to the live server. My docroot points to a folder with has site dir, wire dir, .htaccess and index.php which works fine. There are some templates that are not getting rendered post the migration and showing the error of Trying to get property of new url. This is only on a few pages. All was working fine before the migration though.

    I have also edited the site/templates/home.php to include a file called ./homepage.php which is essentially the  homepage of my website. This works fine too. However if I want to link the other pages to this homepage's navbar what would the href value look like? For example I want to link a page called about.php (which is in the same directory as homepage.php.), how would I do it? I tried putting ./about.php and even ./about-us(the URL set from the admin panel of processwire for this page)but none of them work. It just pulls the URL as www.mywebsite.com/about.php or www.mywebsite.com/about-us and hence shows an error saying Not Found :The requested URL was not found on this server.  Also I can no longer view any pages from the admin panel as well. It gives the same 404 URL not found error. Did I mess anything up during the migration?

    Any help with the above is appreciated.

    Thanks.

  12. Thanks all. It now works find. Had to adjust the permissions of the folders. I am now trying to map my website to a live URL say www.something.com. As per a few forum posts, I put the site directory, wire directory, .htaccess and index.php in my docroot folder and also made sure to give read and write permissions to the necessary folders which is site/assets, site/modules, site/assets/cache, site/assets/files, site/assets/logs. But when I open the website domain, I get these errors. My docroot points to /var/www/html/test_website.


    Warning: file_put_contents(/var/www/html/test_website/site/assets/cache/FileCompiler/site/templates/home.php): failed to open stream: Permission denied in /var/www/html/test_website/wire/core/FileCompiler.php on line 400

    Warning: fopen(/var/www/html/test_website/site/assets/logs/file-compiler.txt): failed to open stream: Permission denied in /var/www/html/test_website/wire/core/FileLog.php on line 164

    Anything I might be missing while mapping?

  13. I put the site, wire, .htaccess and index.php in my docroot folder and also made sure to give read and write permissions to the necessary folders which is site/assets, site/modules, site/assets/cache, site/assets/files, site/assets/logs. But when I open the website domain, I get these errors. My docroot points to /var/www/html/test_website.


    Warning: file_put_contents(/var/www/html/test_website/site/assets/cache/FileCompiler/site/templates/home.php): failed to open stream: Permission denied in /var/www/html/test_website/wire/core/FileCompiler.php on line 400

    Warning: fopen(/var/www/html/test_website/site/assets/logs/file-compiler.txt): failed to open stream: Permission denied in /var/www/html/test_website/wire/core/FileLog.php on line 164

    Anything I might be missing?

  14. 2 hours ago, dotnetic said:

    You need to give the correct rights via CHMOD or CHOWN to some folders. for example the logs directory and the files in it need read and write access. Also it seems that you didn't upload the modules folder. Please assure that the folders 

    site/assets/files
    site/assets/cache
    site/assets/logs 

    exist and have the correct rights

    @dotnetic

    I gave all those three folders the read and write permissions. Also I replaced the site folder on the new server with the site folder from the old server. The templates and modules folder have been included in there too. What is the standard procedure? Do I need to install PW on the new server with a blank profile, and then replace the site folder? It seems easy, but I am still missing something.

  15. Hello All,

      I am trying to migrate my website smoothly from dev to prod. I followed this process:

    Old Server:

    1. Download the database export.
    2. Download the site folder.

    New Server:

    1. Install Processwire from scratch. Was able to get through.
    2. Delete the site folder and Empty the database.
    3. Upload the site folder from the old host.
    4. Import the database from the old host.
    5. Empty site/assets/cache folder and also dropped the caches table from database.
    6. Update the config.php where necessary (database credentials, etc.).

    Now when I open my admin panel or website, it gives a whole page of these errors:

    Warning: fopen(/var/www/html/GF_website/processwire-dev/site/assets/logs/exceptions.txt): failed to open stream: Permission denied in /var/www/html/GF_website/processwire-dev/wire/core/FileLog.php on line 164

     

    Fatal error: Exception: Unable to create directory /var/www/html/GF_website/processwire-dev/site/assets/cache/FileCompiler/site/modules/ (in /var/www/html/GF_website/processwire-dev/wire/core/FileCompiler.php line 239) #0 /var/www/html/GF_website/processwire-dev/wire/core/FileCompiler.php(1068): ProcessWire\FileCompiler->initTargetPath() #1 /var/www/html/GF_website/processwire-dev/wire/core/ProcessWire.php(808): ProcessWire\FileCompiler->maintenance() #2 /var/www/html/GF_website/processwire-dev/wire/core/Wire.php(417): ProcessWire\ProcessWire->___finished(Array) #3 /var/www/html/GF_website/processwire-dev/wire/core/WireHooks.php(951): ProcessWire\Wire->_callMethod('___finished', Array) #4 /var/www/html/GF_website/processwire-dev/wire/core/Wire.php(485): ProcessWire\WireHooks->runHooks(Object(ProcessWire\ProcessWire), 'finished', Array) #5 /var/www/html/GF_website/processwire-dev/wire/core/ProcessWire.php(885): ProcessWire\Wire->__call('finished', Array) #6 /var/www/html/GF_website/processwire-dev/wire/core/ProcessWire.ph in /var/www/html/GF_website/processwire-dev/index.php on line 64
     

    Hey now… Error: Exception: Unable to create directory /site/modules/ (in wire/core/FileCompiler.php line 239)

     

    Not sure what I did wrong. Any help is appreciated.

    Thank you.

     

     

  16. Hello All,

       I have been getting this warning at the top of every page of my website since yesterday. 

    Warning: file_put_contents(/var/www/html/GF_website/admin/site/assets/cache/FileCompiler/site/templates/index.php): failed to open stream: Permission denied in /var/www/html/GF_website/admin/wire/core/FileCompiler.php on line 400

      All was fine until then and it suddenly started popping up. Though I am able to publish and delete things from the Processwire admin panel, none of the changes I make to any of the .php files of my site are reflecting. I suppose it is due to failure to compile the file. Any help is appreciated since I am a newbie to Processwire and still trying to figure things out.

     

  17. I emptied the table in caches as per another post here. It works now, However, I get this warning on my website now.


    Warning: file_put_contents(/var/www/html/GF_website/admin/site/assets/cache/FileCompiler/site/templates/index.php): failed to open stream: Permission denied in /var/www/html/GF_website/admin/wire/core/FileCompiler.php on line 400

    Any idea why this might be happening?

  18. On 10/26/2011 at 6:29 PM, ryan said:

    I think it's most likely the modules cache. Delete these files and see if that fixes it?

     

    rm /site/assets/cache/Modules.*.cache
     

    Hello Ryan,

     Does this mean that I have to empty the /site/assets/cache folder? I suddenly started getting these errors on my admin panel today and none of the pages data seems to load. Any idea why this might be happening?

     

     

    Screenshot1.png

×
×
  • Create New...